Module: Card::Set::All::Text::Format

Extended by:
Card::Set::AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod004-format/all/text.rb

Instance Method Summary collapse

Instance Method Details

#nestless_contentObject



15
16
17
18
19
20
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/text.rb', line 15

def nestless_content
  content_obj = content_object card.content
  content_obj.strip_nests
  content_obj.process_chunks
  content_obj.to_s
end

#to_text(html) ⇒ Object



11
12
13
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/text.rb', line 11

def to_text html
  HTMLEntities.new.decode strip_tags(html).to_s
end

#view: text_without_nestsObject



22
23
24
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/text.rb', line 22

view :text_without_nests do
  to_text nestless_content
end