Class: Goat::ExpansionHelper

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pgid) ⇒ ExpansionHelper

Returns a new instance of ExpansionHelper.



897
898
899
900
# File 'lib/goat.rb', line 897

def initialize(pgid)
  @components = {}
  @pgid = pgid
end

Instance Attribute Details

#componentsObject (readonly)

Returns the value of attribute components.



895
896
897
# File 'lib/goat.rb', line 895

def components
  @components
end

Instance Method Details

#component(id) ⇒ Object



907
908
909
# File 'lib/goat.rb', line 907

def component(id)
  @components[id]
end

#component_used(c) ⇒ Object



902
903
904
905
# File 'lib/goat.rb', line 902

def component_used(c)
  @components[c.id] = c
  c.pgid = @pgid
end