Class: Dedalus::PatternLibrary::Models::LibrarySection
- Inherits:
-
Metacosm::Model
- Object
- Metacosm::Model
- Dedalus::PatternLibrary::Models::LibrarySection
- Defined in:
- lib/dedalus/pattern_library/models/library_section.rb
Instance Attribute Summary collapse
-
#about ⇒ Object
Returns the value of attribute about.
-
#color ⇒ Object
Returns the value of attribute color.
-
#description ⇒ Object
Returns the value of attribute description.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#about ⇒ Object
Returns the value of attribute about.
5 6 7 |
# File 'lib/dedalus/pattern_library/models/library_section.rb', line 5 def about @about end |
#color ⇒ Object
Returns the value of attribute color.
5 6 7 |
# File 'lib/dedalus/pattern_library/models/library_section.rb', line 5 def color @color end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/dedalus/pattern_library/models/library_section.rb', line 5 def description @description end |
#icon ⇒ Object
Returns the value of attribute icon.
5 6 7 |
# File 'lib/dedalus/pattern_library/models/library_section.rb', line 5 def icon @icon end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/dedalus/pattern_library/models/library_section.rb', line 5 def name @name end |
Instance Method Details
#build_items_from_classes(klasses, kind:) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/dedalus/pattern_library/models/library_section.rb', line 9 def build_items_from_classes(klasses, kind:) klasses.each do |klass| item_name = klass.name.to_s create_library_item( name: item_name.demodulize.titleize, color: self.color, kind: kind, item_class_name: item_name, description: klass.description, example_data: klass.example_data ) end end |