Class: Seek::SampleTemplates::Column
- Inherits:
-
Object
- Object
- Seek::SampleTemplates::Column
- Defined in:
- lib/seek/sample_templates/generator.rb
Instance Attribute Summary collapse
-
#contents ⇒ Object
Returns the value of attribute contents.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(name, contents = []) ⇒ Column
constructor
A new instance of Column.
Constructor Details
#initialize(name, contents = []) ⇒ Column
Returns a new instance of Column.
15 16 17 18 |
# File 'lib/seek/sample_templates/generator.rb', line 15 def initialize(name, contents = []) @name = name @contents = contents end |
Instance Attribute Details
#contents ⇒ Object
Returns the value of attribute contents.
14 15 16 |
# File 'lib/seek/sample_templates/generator.rb', line 14 def contents @contents end |
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/seek/sample_templates/generator.rb', line 14 def name @name end |
Instance Method Details
#as_json ⇒ Object
20 21 22 |
# File 'lib/seek/sample_templates/generator.rb', line 20 def as_json { @name => @contents } end |