Module: Card::Set::Type::Image::HtmlFormat
- Extended by:
- AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod023-bar_and_box/type/image.rb
Instance Method Summary collapse
-
#image_box ⇒ Object
-
#image_box_card_name ⇒ Object
-
#image_box_link_target ⇒ Object
-
#image_box_size ⇒ Object
METHODS FOR OVERRIDE.
-
#image_box_title ⇒ Object
-
#view: boxed ⇒ Object
-
#view: boxed_link ⇒ Object
Instance Method Details
#image_box ⇒ Object
21 22 23 24 25 26 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/type/image.rb', line 21 def image_box voo.size ||= :medium wrap_with :div, title: image_box_title, class: "image-box #{voo.size}" do yield image_box_size end end |
#image_box_card_name ⇒ Object
34 35 36 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/type/image.rb', line 34 def image_box_card_name card.name.compound? ? card.name.left : card.name end |
#image_box_link_target ⇒ Object
38 39 40 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/type/image.rb', line 38 def image_box_link_target image_box_card_name end |
#image_box_size ⇒ Object
METHODS FOR OVERRIDE
30 31 32 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/type/image.rb', line 30 def image_box_size IMAGE_BOX_SIZE_MAP[voo.size.to_sym] || :medium end |
#image_box_title ⇒ Object
42 43 44 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/type/image.rb', line 42 def image_box_title voo.title || image_box_card_name end |
#view: boxed ⇒ Object
13 14 15 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/type/image.rb', line 13 view :boxed, unknown: true do image_box { |size| render_core size: size } end |
#view: boxed_link ⇒ Object
17 18 19 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/type/image.rb', line 17 view :boxed_link, unknown: true do image_box { |size| link_to_card image_box_link_target, render_core(size: size) } end |