Class: Elrpc::Method

Inherits:
Object
  • Object
show all
Defined in:
lib/elrpc.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#argdocObject (readonly)

Returns the value of attribute argdoc.



149
150
151
# File 'lib/elrpc.rb', line 149

def argdoc
  @argdoc
end

#nameObject (readonly)

Returns the value of attribute name.



148
149
150
# File 'lib/elrpc.rb', line 148

def name
  @name
end

#procObject (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