Class: Seek::SampleTemplates::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/seek/sample_templates/generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentsObject

Returns the value of attribute contents.



14
15
16
# File 'lib/seek/sample_templates/generator.rb', line 14

def contents
  @contents
end

#nameObject

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_jsonObject



20
21
22
# File 'lib/seek/sample_templates/generator.rb', line 20

def as_json
  { @name => @contents }
end