Module: Card::Set::Type::Mod::HtmlFormat
- Extended by:
- AbstractFormat
- Defined in:
- platypus/tmp/set/gem-card/mod001-core/type/mod.rb,
platypus/tmp/set/gem-defaults/mod004-format/type/mod.rb
Instance Method Summary collapse
-
#before_bar ⇒ Object
-
#render_section_views(list) ⇒ Object
-
#view: admin ⇒ Object
-
#view: bar_right ⇒ Object
-
#view: cardtypes ⇒ Object
-
#view: configurations ⇒ Object
-
#view: core ⇒ Object
-
#view: depends_on ⇒ Object
-
#view: description ⇒ Object
-
#view: gem_info ⇒ Object
-
#view: scripts ⇒ Object
-
#view: settings ⇒ Object
-
#view: styles ⇒ Object
-
#view: tasks ⇒ Object
-
#view: views ⇒ Object
Instance Method Details
#before_bar ⇒ Object
19 20 21 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/type/mod.rb', line 19 def voo.show :bar_middle end |
#render_section_views(list) ⇒ Object
32 33 34 |
# File 'platypus/tmp/set/gem-card/mod001-core/type/mod.rb', line 32 def render_section_views list list.map { |view_name| send("render_#{view_name}") }.compact.join "<br/>" end |
#view: admin ⇒ Object
9 10 11 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/type/mod.rb', line 9 view :admin do render_core end |
#view: bar_right ⇒ Object
13 14 15 16 17 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/type/mod.rb', line 13 view :bar_right do %w[settings configurations tasks cardtypes scripts styles].filter do |name| card.send("#{name}?") end.join ", " end |
#view: cardtypes ⇒ Object
40 41 42 |
# File 'platypus/tmp/set/gem-card/mod001-core/type/mod.rb', line 40 view :cardtypes do nested_list_section "Cardtypes", card.cardtypes end |
#view: configurations ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'platypus/tmp/set/gem-card/mod001-core/type/mod.rb', line 44 view :configurations do return unless card.configurations card.configurations.map do |category, names| list_section("#{category.capitalize} Configuration", names.map(&:to_sym)) end.join " " end |
#view: core ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'platypus/tmp/set/gem-card/mod001-core/type/mod.rb', line 14 view :core do render_section_views(%i[ description settings configurations cardtypes styles scripts tasks views depends_on ].select { |name| card.send("#{name}?") }) end |
#view: depends_on ⇒ Object
89 90 91 |
# File 'platypus/tmp/set/gem-card/mod001-core/type/mod.rb', line 89 view :depends_on do list_section "Depends on", card.depends_on end |
#view: description ⇒ Object
28 29 30 |
# File 'platypus/tmp/set/gem-card/mod001-core/type/mod.rb', line 28 view :description do content_tag(:p, card.description) end |
#view: gem_info ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'platypus/tmp/set/gem-card/mod001-core/type/mod.rb', line 72 view :gem_info do return unless card.mod&.spec properties = %w[name summary version authors description email homepage].map do |property| "#{property}: #{card.mod.spec.send(property)}" end section "Gem info", list_group(properties) + accordion_item("files", body: list_group(card.mod.spec.files), context: "files") + accordion_item("depends on ", body: list_section_content(card.depends_on), context: "depends_on") end |
#view: scripts ⇒ Object
66 67 68 69 70 |
# File 'platypus/tmp/set/gem-card/mod001-core/type/mod.rb', line 66 view :scripts do style = card.fetch :script return unless style section "Scripts", nest(style, view: :core) end |
#view: settings ⇒ Object
36 37 38 |
# File 'platypus/tmp/set/gem-card/mod001-core/type/mod.rb', line 36 view :settings do list_section "Settings", card.settings end |
#view: styles ⇒ Object
60 61 62 63 64 |
# File 'platypus/tmp/set/gem-card/mod001-core/type/mod.rb', line 60 view :styles do style = card.fetch :style return unless style section "Styles", nest(style, view: :core) end |
#view: tasks ⇒ Object
53 54 55 56 57 58 |
# File 'platypus/tmp/set/gem-card/mod001-core/type/mod.rb', line 53 view :tasks do tasks = card.tasks return unless tasks.present? section "Tasks", task_table(tasks) end |
#view: views ⇒ Object
93 94 95 |
# File 'platypus/tmp/set/gem-card/mod001-core/type/mod.rb', line 93 view :views do section "Views", list_group(card.views) end |