Class: Acorn::Second

Inherits:
Object
  • Object
show all
Defined in:
lib/acorn/dsl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Second

Returns a new instance of Second.



21
22
23
# File 'lib/acorn/dsl.rb', line 21

def initialize data
  self.data = data
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



19
20
21
# File 'lib/acorn/dsl.rb', line 19

def data
  @data
end

Instance Method Details

#and(seed_name) ⇒ Object



25
26
27
28
# File 'lib/acorn/dsl.rb', line 25

def and seed_name
  self.data.seed_names << seed_name
  self
end

#into_attr(attr_name) ⇒ Object



30
31
32
33
# File 'lib/acorn/dsl.rb', line 30

def into_attr attr_name
  self.data.attr_names << attr_name
  Third.new self.data 
end