Method: OEHClient::Realtime::Event#initialize
- Defined in:
- lib/oehclient/realtime/event.rb
#initialize(attributes = nil) ⇒ Event
constructor that allows the passed Ruby Hash to be mapped to the
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/oehclient/realtime/event.rb', line 44 def initialize(attributes=nil) # set the instance attributes is the parameter hash is created if (!attributes.nil? && attributes.kind_of?(Hash)) @uri = attributes[:uri] if (attributes.has_key?(:uri)) @tid = attributes[:tid] if (attributes.has_key?(:tid)) @space = OEHClient::Config::SpaceManager.instance.get(attributes[:sk]) if (attributes.has_key?(:sk)) end end |