Class: Synapse::Easy::ExtraSection
- Inherits:
-
Object
- Object
- Synapse::Easy::ExtraSection
- Includes:
- Fake::Hash
- Defined in:
- lib/synapse/easy/extra_section.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #each(*args, &block) ⇒ Object
-
#initialize(params = {}) ⇒ ExtraSection
constructor
A new instance of ExtraSection.
- #label ⇒ Object
- #section_options ⇒ Object
- #to_synapse ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ ExtraSection
Returns a new instance of ExtraSection.
10 11 12 13 14 15 |
# File 'lib/synapse/easy/extra_section.rb', line 10 def initialize params={} @name = params[:name] @type = params[:type] @type ||= "frontend" @options ||= [] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/synapse/easy/extra_section.rb', line 9 def name @name end |
#options ⇒ Object
Returns the value of attribute options.
9 10 11 |
# File 'lib/synapse/easy/extra_section.rb', line 9 def @options end |
#type ⇒ Object
Returns the value of attribute type.
9 10 11 |
# File 'lib/synapse/easy/extra_section.rb', line 9 def type @type end |
Instance Method Details
#each(*args, &block) ⇒ Object
22 23 24 |
# File 'lib/synapse/easy/extra_section.rb', line 22 def each *args, &block .each(*args,&block) end |
#label ⇒ Object
16 17 18 |
# File 'lib/synapse/easy/extra_section.rb', line 16 def label "#{type} #{name}" end |
#section_options ⇒ Object
19 20 21 |
# File 'lib/synapse/easy/extra_section.rb', line 19 def end |
#to_synapse ⇒ Object
25 26 27 28 29 |
# File 'lib/synapse/easy/extra_section.rb', line 25 def to_synapse { label => } end |