Class: UU::OS::VUC::Event
- Inherits:
-
Object
- Object
- UU::OS::VUC::Event
- Defined in:
- uu_adk-0.28.16/lib/uu/os/vuc/event.rb
Overview
Form event object.
Instance Attribute Summary (collapse)
-
- (String) code
readonly
Event code.
-
- (String) form
readonly
ID of form which event belongs to.
-
- (String) id
readonly
Unique event ID.
-
- (String) source_id
readonly
ID of component which invoked event.
-
- (String) source_uri
readonly
URI of object which invoked event (e.g. process URI).
Instance Method Summary (collapse)
-
- (Event) initialize(data = nil)
constructor
Creates new instance of event.
Constructor Details
- (Event) initialize(data = nil)
Creates new instance of event.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'uu_adk-0.28.16/lib/uu/os/vuc/event.rb', line 37 def initialize(data = nil) if data.nil? @raw_attrs = {} return end if data.kind_of?String data = JSON.parse(data, :symbolize_names => true) end if data.kind_of?Hash @raw_attrs = data elsif data.kind_of?Event if data.raw_attrs @raw_attrs = data.raw_attrs else @raw_attrs = {} end else raise ArgumentError.new("Event data must be JSON String or Hash, but was #{data.class}.") end end |
Instance Attribute Details
- (String) code (readonly)
Event code.
20 21 22 |
# File 'uu_adk-0.28.16/lib/uu/os/vuc/event.rb', line 20 def code @code end |
- (String) form (readonly)
ID of form which event belongs to.
32 33 34 |
# File 'uu_adk-0.28.16/lib/uu/os/vuc/event.rb', line 32 def form @form end |
- (String) id (readonly)
Unique event ID.
16 17 18 |
# File 'uu_adk-0.28.16/lib/uu/os/vuc/event.rb', line 16 def id @id end |
- (String) source_id (readonly)
ID of component which invoked event.
24 25 26 |
# File 'uu_adk-0.28.16/lib/uu/os/vuc/event.rb', line 24 def source_id @source_id end |
- (String) source_uri (readonly)
URI of object which invoked event (e.g. process URI).
28 29 30 |
# File 'uu_adk-0.28.16/lib/uu/os/vuc/event.rb', line 28 def source_uri @source_uri end |