Class: LiveResource::RemoteMethodForward
- Inherits:
-
Object
- Object
- LiveResource::RemoteMethodForward
- Defined in:
- lib/live_resource/methods/forward.rb
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#next ⇒ Object
readonly
Returns the value of attribute next.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
- #continue(resource, method, *params) ⇒ Object
-
#initialize(resource, method, params) ⇒ RemoteMethodForward
constructor
A new instance of RemoteMethodForward.
- #inspect ⇒ Object
Constructor Details
#initialize(resource, method, params) ⇒ RemoteMethodForward
Returns a new instance of RemoteMethodForward.
7 8 9 10 11 12 |
# File 'lib/live_resource/methods/forward.rb', line 7 def initialize(resource, method, params) @resource = resource @method = method @params = params @next = nil end |
Instance Attribute Details
#method ⇒ Object (readonly)
Returns the value of attribute method.
5 6 7 |
# File 'lib/live_resource/methods/forward.rb', line 5 def method @method end |
#next ⇒ Object (readonly)
Returns the value of attribute next.
5 6 7 |
# File 'lib/live_resource/methods/forward.rb', line 5 def next @next end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
5 6 7 |
# File 'lib/live_resource/methods/forward.rb', line 5 def params @params end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
5 6 7 |
# File 'lib/live_resource/methods/forward.rb', line 5 def resource @resource end |
Instance Method Details
#continue(resource, method, *params) ⇒ Object
14 15 16 17 |
# File 'lib/live_resource/methods/forward.rb', line 14 def continue(resource, method, *params) @next = self.class.new(resource, method, params) self end |
#inspect ⇒ Object
19 20 21 |
# File 'lib/live_resource/methods/forward.rb', line 19 def inspect "#{self.class}: #{@resource} #{@method} (#{@params.length} params)" end |