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
-
#chunk_list ⇒ Object
override to customize by set.
-
#label_description ⇒ Object
TODO: move this into a nest once popovers are stub safe.
-
#label_with_description(label, description) ⇒ Object
-
#one_line_character_limit ⇒ Object
-
#one_line_content ⇒ Object
-
#raw_one_line_content ⇒ Object
-
#view: closed_content ⇒ Object
DEPRECATED.
-
#view: label ⇒ Object
-
#view: one_line_content ⇒ Object
-
#view: raw_one_line_content ⇒ Object
-
#view: smart_label ⇒ Object
Instance Method Details
#chunk_list ⇒ Object
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_description ⇒ Object
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_limit ⇒ Object
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_content ⇒ Object
54 55 56 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/content.rb', line 54 def one_line_content truncate (render_core), length: one_line_character_limit end |
#raw_one_line_content ⇒ Object
50 51 52 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/content.rb', line 50 def raw_one_line_content truncate (render_raw), length: one_line_character_limit end |
#view: closed_content ⇒ Object
DEPRECATED
23 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/content.rb', line 23 view :closed_content, :one_line_content |
#view: label ⇒ Object
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_content ⇒ Object
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_content ⇒ Object
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_label ⇒ Object
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 |