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.



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

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

Instance Attribute Details

#componentsObject (readonly)

Returns the value of attribute components.



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

def components
  @components
end

Instance Method Details

#component(id) ⇒ Object



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

def component(id)
  @components[id]
end

#component_used(c) ⇒ Object



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

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