Class: Acorn::Third

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Third

Returns a new instance of Third.



39
40
41
# File 'lib/acorn/dsl.rb', line 39

def initialize data
  self.data = data
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



37
38
39
# File 'lib/acorn/dsl.rb', line 37

def data
  @data
end

Instance Method Details

#and_attr(attr_name) ⇒ Object



43
44
45
46
# File 'lib/acorn/dsl.rb', line 43

def and_attr attr_name
  self.data.attr_names << attr_name
  self
end

#of_AR_class(ar_class) ⇒ Object



48
49
50
51
52
# File 'lib/acorn/dsl.rb', line 48

def of_AR_class ar_class
  self.data.ar_class = ar_class
  self.data.process
  First.new self.data.dir_name
end