Class: Foo

Inherits:
Object
  • Object
show all
Includes:
HomeQ::Poolable
Defined in:
lib/homeq/base/poolable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HomeQ::Poolable

included, #recycle

Constructor Details

#initialize(x) ⇒ Foo Also known as: reinitialize

Returns a new instance of Foo.



74
75
76
# File 'lib/homeq/base/poolable.rb', line 74

def initialize(x)
  @x = x
end

Instance Attribute Details

#xObject

Returns the value of attribute x.



73
74
75
# File 'lib/homeq/base/poolable.rb', line 73

def x
  @x
end

Instance Method Details

#deinitializeObject



78
79
80
81
82
# File 'lib/homeq/base/poolable.rb', line 78

def deinitialize
  instance_variables.each {|v|
    eval "#{v} = nil"
  }
end