Class: ProductInterpreter2

Inherits:
DslContext show all
Defined in:
lib/ProductInterpreter2.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DslContext

bubble, execute, polish_text

Constructor Details

#initializeProductInterpreter2

Returns a new instance of ProductInterpreter2.



8
9
10
11
12
# File 'lib/ProductInterpreter2.rb', line 8

def initialize
  @name = ''
  @entity = Array.new
  @coverage = Array.new
end

Instance Attribute Details

#coverageObject (readonly)

Returns the value of attribute coverage.



6
7
8
# File 'lib/ProductInterpreter2.rb', line 6

def coverage
  @coverage
end

#entityObject (readonly)

Returns the value of attribute entity.



5
6
7
# File 'lib/ProductInterpreter2.rb', line 5

def entity
  @entity
end

Instance Method Details

#coverages(*args) ⇒ Object



26
27
28
# File 'lib/ProductInterpreter2.rb', line 26

def coverages(*args)
  @currentGroup = @coverage
end

#endcoverages(*args) ⇒ Object



30
31
# File 'lib/ProductInterpreter2.rb', line 30

def endcoverages(*args)
end

#endentities(*args) ⇒ Object



37
38
# File 'lib/ProductInterpreter2.rb', line 37

def endentities(*args)
end

#endproduct(*args) ⇒ Object



22
23
24
# File 'lib/ProductInterpreter2.rb', line 22

def endproduct(*args)
  
end

#entities(*args) ⇒ Object



33
34
35
# File 'lib/ProductInterpreter2.rb', line 33

def entities(*args)
  @currentGroup = @entity
end

#getResultObject



14
15
16
# File 'lib/ProductInterpreter2.rb', line 14

def getResult
  self
end

#has_between(*args) ⇒ Object



48
49
50
# File 'lib/ProductInterpreter2.rb', line 48

def has_between(*args)
  @currentGroup.push([args[0].to_s(), 'has_many'])
end

#has_many(*args) ⇒ Object



44
45
46
# File 'lib/ProductInterpreter2.rb', line 44

def has_many(*args)
  @currentGroup.push([args[0].to_s(), 'has_many'])
end

#has_one(*args) ⇒ Object



40
41
42
# File 'lib/ProductInterpreter2.rb', line 40

def has_one(*args)
  @currentGroup.push([args[0].to_s(), 'has_one'])
end

#product(*args) ⇒ Object



18
19
20
# File 'lib/ProductInterpreter2.rb', line 18

def product(*args)
  @name = args[0]
end