Class: PoolParty::Base
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #after_initialized ⇒ Object
-
#initialize(name, o = {}, &block) ⇒ Base
constructor
A new instance of Base.
- #method_missing(m, *a, &block) ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(name, o = {}, &block) ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 14 15 |
# File 'lib/poolparty/base.rb', line 9 def initialize(name, o={}, &block) @name = name @init_opts = o (o) instance_eval &block if block after_initialized end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *a, &block) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/poolparty/base.rb', line 21 def method_missing(m,*a,&block) if parent.respond_to?(m) parent.send(m,*a,&block) else super end end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/poolparty/base.rb', line 8 def name @name end |