Class: SinglePlatform::MenuSection
- Inherits:
-
Object
- Object
- SinglePlatform::MenuSection
- Defined in:
- lib/single_platform/menu_section.rb
Instance Attribute Summary collapse
-
#desc ⇒ Object
readonly
Returns the value of attribute desc.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#menu ⇒ Object
readonly
Returns the value of attribute menu.
-
#menu_items ⇒ Object
readonly
Returns the value of attribute menu_items.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#order_num ⇒ Object
readonly
Returns the value of attribute order_num.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(menu, data) ⇒ MenuSection
constructor
A new instance of MenuSection.
Constructor Details
#initialize(menu, data) ⇒ MenuSection
Returns a new instance of MenuSection.
5 6 7 8 9 10 11 |
# File 'lib/single_platform/menu_section.rb', line 5 def initialize(, data) @menu = @menu_items = [] data.each do |key, value| instance_variable_set :"@#{key.underscore}", value end end |
Instance Attribute Details
#desc ⇒ Object (readonly)
Returns the value of attribute desc.
3 4 5 |
# File 'lib/single_platform/menu_section.rb', line 3 def desc @desc end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/single_platform/menu_section.rb', line 3 def id @id end |
#menu ⇒ Object (readonly)
Returns the value of attribute menu.
2 3 4 |
# File 'lib/single_platform/menu_section.rb', line 2 def @menu end |
#menu_items ⇒ Object (readonly)
Returns the value of attribute menu_items.
2 3 4 |
# File 'lib/single_platform/menu_section.rb', line 2 def @menu_items end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/single_platform/menu_section.rb', line 3 def name @name end |
#order_num ⇒ Object (readonly)
Returns the value of attribute order_num.
3 4 5 |
# File 'lib/single_platform/menu_section.rb', line 3 def order_num @order_num end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/single_platform/menu_section.rb', line 3 def title @title end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/single_platform/menu_section.rb', line 3 def type @type end |