Module: Card::Set::Abstract::Pointer::OtherViews::JsonFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- tmpsets/set/mod008-pointer/abstract/02_pointer/other_views.rb
Overview
JSON views
Instance Method Summary collapse
Instance Method Details
#essentials ⇒ Object
72 73 74 75 76 77 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/other_views.rb', line 72 def essentials return {} if depth > max_depth card.item_cards.map do |item| nest item, view: :essentials end end |
#item_cards ⇒ Object
60 61 62 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/other_views.rb', line 60 def item_cards card.item_cards end |
#items_for_export ⇒ Object
68 69 70 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/other_views.rb', line 68 def items_for_export card.item_cards end |
#max_depth ⇒ Object
64 65 66 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/other_views.rb', line 64 def max_depth params[:max_depth] || 1 end |