Class: PrePlay::Event
- Inherits:
-
Struct
- Object
- Struct
- PrePlay::Event
- Defined in:
- lib/preplay/event.rb,
lib/preplay/event/version.rb
Defined Under Namespace
Classes: Configuration
Constant Summary collapse
- VERSION =
"0.0.1"
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#data ⇒ Object
Returns the value of attribute data.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context
24 25 26 |
# File 'lib/preplay/event.rb', line 24 def context @context end |
#data ⇒ Object
Returns the value of attribute data
24 25 26 |
# File 'lib/preplay/event.rb', line 24 def data @data end |
#metadata ⇒ Object
Returns the value of attribute metadata
24 25 26 |
# File 'lib/preplay/event.rb', line 24 def @metadata end |
Class Method Details
.configuration(&block) ⇒ Object
39 40 41 |
# File 'lib/preplay/event.rb', line 39 def self.configuration(&block) @@configuration ||= Configuration.new(&block) end |
.configure(&block) ⇒ Object
35 36 37 |
# File 'lib/preplay/event.rb', line 35 def self.configure(&block) configuration(&block) end |
Instance Method Details
#to_scrolls(opts = nil) ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'lib/preplay/event.rb', line 45 def to_scrolls(opts = nil) event = { 'd' => data, 'c' => context, 'm' => } flatten_keys(event).merge!(preplay_event: true) end |