Class: OBIX::Objects::Operation

Inherits:
Object show all
Defined in:
lib/obix/objects/operation.rb

Overview

Operations represent operations.

Instance Attribute Summary

Attributes inherited from Base

#objects, #parent

Instance Method Summary collapse

Methods inherited from Base

#find, #initialize, parse, #to_node, #to_s, #to_xml

Methods included from Tag

#attribute, #tag

Constructor Details

This class inherits a constructor from OBIX::Objects::Base

Instance Method Details

#invoke(object = OBIX::Objects::Object.new) ⇒ Object

Invoke the operation.

object - An OBIX::Objects::Object or derivative thereof. Defaults to an object

that implements the "obix:Nil" contract.

Returns an OBIX::Objects::Object or derivative thereof describing the result of the operation.



20
21
22
23
24
# File 'lib/obix/objects/operation.rb', line 20

def invoke object = OBIX::Objects::Object.new
  string = Network.post href, object

  OBIX.parse string: string
end