Class: Seek::SampleTemplates::Column
- Inherits:
-
Object
- Object
- Seek::SampleTemplates::Column
- Defined in:
- lib/seek/sample_templates/column.rb
Overview
Describes a column in the template. The name is the text put in the top row, and contents will create a dropdown in the row below unless empty
Instance Attribute Summary collapse
-
#contents ⇒ Object
readonly
Returns the value of attribute contents.
-
#name ⇒ Object
readonly
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.
9 10 11 12 |
# File 'lib/seek/sample_templates/column.rb', line 9 def initialize(name, contents = []) @name = name @contents = contents end |
Instance Attribute Details
#contents ⇒ Object (readonly)
Returns the value of attribute contents.
7 8 9 |
# File 'lib/seek/sample_templates/column.rb', line 7 def contents @contents end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/seek/sample_templates/column.rb', line 7 def name @name end |
Instance Method Details
#as_json ⇒ Object
14 15 16 |
# File 'lib/seek/sample_templates/column.rb', line 14 def as_json { @name => @contents } end |