Class: Elrpc::Method
- Inherits:
-
Object
- Object
- Elrpc::Method
- Defined in:
- lib/elrpc.rb
Instance Attribute Summary collapse
-
#argdoc ⇒ Object
readonly
Returns the value of attribute argdoc.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#proc ⇒ Object
readonly
Returns the value of attribute proc.
Instance Method Summary collapse
- #call(args) ⇒ Object
-
#initialize(name, argdoc = nil, docstring = nil, &proc) ⇒ Method
constructor
A new instance of Method.
Constructor Details
#initialize(name, argdoc = nil, docstring = nil, &proc) ⇒ Method
Returns a new instance of Method.
147 148 149 150 151 152 |
# File 'lib/elrpc.rb', line 147 def initialize(name, argdoc=nil, docstring=nil, &proc) @name = name.to_sym @proc = proc @argdoc = argdoc @docstring = docstring end |
Instance Attribute Details
#argdoc ⇒ Object (readonly)
Returns the value of attribute argdoc.
145 146 147 |
# File 'lib/elrpc.rb', line 145 def argdoc @argdoc end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
144 145 146 |
# File 'lib/elrpc.rb', line 144 def name @name end |
#proc ⇒ Object (readonly)
Returns the value of attribute proc.
144 145 146 |
# File 'lib/elrpc.rb', line 144 def proc @proc end |
Instance Method Details
#call(args) ⇒ Object
154 155 156 |
# File 'lib/elrpc.rb', line 154 def call(args) @proc.call(*args) end |