Module: Card::Set::All::Content::Format

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

Constant Summary collapse

ONE_LINE_CHARACTER_LIMIT =
60

Instance Method Summary collapse

Instance Method Details

#chunk_listObject

override to customize by set



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

def chunk_list
  :default
end

#label_descriptionObject

TODO: move this into a nest once popovers are stub safe



44
45
46
47
48
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/content.rb', line 44

def label_description
  return unless (desc = card.fetch :description)

  desc.format.render_core
end

#label_with_description(label, description) ⇒ Object



37
38
39
40
41
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/content.rb', line 37

def label_with_description label, description
  return label unless description

  "#{label} #{popover_link description}"
end

#one_line_character_limitObject



58
59
60
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/content.rb', line 58

def one_line_character_limit
  voo.size || ONE_LINE_CHARACTER_LIMIT
end

#one_line_contentObject



54
55
56
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/content.rb', line 54

def one_line_content
  truncate strip_tags(render_core), length: one_line_character_limit
end

#raw_one_line_contentObject



50
51
52
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/content.rb', line 50

def raw_one_line_content
  truncate strip_tags(render_raw), length: one_line_character_limit
end

#view: closed_contentObject

DEPRECATED



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

view :closed_content, :one_line_content

#view: labelObject



29
30
31
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/content.rb', line 29

view :label do
  card.label.to_s
end

#view: one_line_contentObject



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

view :one_line_content do
  with_nest_mode :compact do
    one_line_content
  end
end

#view: raw_one_line_contentObject



25
26
27
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/content.rb', line 25

view :raw_one_line_content do
  raw_one_line_content
end

#view: smart_labelObject



33
34
35
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/content.rb', line 33

view :smart_label, cache: :never, unknown: true do
  label_with_description render_label, label_description
end