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.
151 152 153 154 155 156 |
# File 'lib/elrpc.rb', line 151 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.
149 150 151 |
# File 'lib/elrpc.rb', line 149 def argdoc @argdoc end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
148 149 150 |
# File 'lib/elrpc.rb', line 148 def name @name end |
#proc ⇒ Object (readonly)
Returns the value of attribute proc.
148 149 150 |
# File 'lib/elrpc.rb', line 148 def proc @proc end |
Instance Method Details
#call(args) ⇒ Object
158 159 160 |
# File 'lib/elrpc.rb', line 158 def call(args) @proc.call(*args) end |