Class: Moku6::Event
- Inherits:
-
Object
- Object
- Moku6::Event
- Defined in:
- lib/moku6/event.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
: Hash[String, untyped].
-
#source_path ⇒ Object
readonly
: String.
Instance Method Summary collapse
-
#action ⇒ Object
: () -> String?.
-
#actor ⇒ Object
: () -> untyped.
-
#category ⇒ Object
: () -> String?.
-
#description ⇒ Object
: () -> String?.
-
#examples ⇒ Object
: () -> Array.
-
#fields ⇒ Object
: () -> Hash[String, untyped].
-
#initialize(data, source_path:) ⇒ Event
constructor
: (Hash[String, untyped]? data, source_path: String) -> void.
-
#label ⇒ Object
: () -> String?.
-
#privacy ⇒ Object
: () -> untyped.
-
#required? ⇒ Boolean
: () -> bool.
-
#retention ⇒ Object
: () -> untyped.
-
#target ⇒ Object
: () -> untyped.
-
#to_h ⇒ Object
: () -> Hash[String, untyped].
-
#visibility ⇒ Object
: () -> untyped.
Constructor Details
#initialize(data, source_path:) ⇒ Event
: (Hash[String, untyped]? data, source_path: String) -> void
10 11 12 13 |
# File 'lib/moku6/event.rb', line 10 def initialize(data, source_path:) @data = data || {} @source_path = source_path end |
Instance Attribute Details
#data ⇒ Object (readonly)
: Hash[String, untyped]
6 7 8 |
# File 'lib/moku6/event.rb', line 6 def data @data end |
#source_path ⇒ Object (readonly)
: String
7 8 9 |
# File 'lib/moku6/event.rb', line 7 def source_path @source_path end |
Instance Method Details
#action ⇒ Object
: () -> String?
16 |
# File 'lib/moku6/event.rb', line 16 def action = data["action"] |
#actor ⇒ Object
: () -> untyped
31 |
# File 'lib/moku6/event.rb', line 31 def actor = data["actor"] |
#category ⇒ Object
: () -> String?
25 |
# File 'lib/moku6/event.rb', line 25 def category = data["category"] |
#description ⇒ Object
: () -> String?
22 |
# File 'lib/moku6/event.rb', line 22 def description = data["description"] |
#examples ⇒ Object
: () -> Array
49 |
# File 'lib/moku6/event.rb', line 49 def examples = data["examples"] || [] |
#fields ⇒ Object
: () -> Hash[String, untyped]
37 |
# File 'lib/moku6/event.rb', line 37 def fields = data["fields"] || {} |
#label ⇒ Object
: () -> String?
19 |
# File 'lib/moku6/event.rb', line 19 def label = data["label"] |
#privacy ⇒ Object
: () -> untyped
40 |
# File 'lib/moku6/event.rb', line 40 def privacy = data["privacy"] |
#required? ⇒ Boolean
: () -> bool
28 |
# File 'lib/moku6/event.rb', line 28 def required? = !!data["required"] |
#retention ⇒ Object
: () -> untyped
46 |
# File 'lib/moku6/event.rb', line 46 def retention = data["retention"] |
#target ⇒ Object
: () -> untyped
34 |
# File 'lib/moku6/event.rb', line 34 def target = data["target"] |
#to_h ⇒ Object
: () -> Hash[String, untyped]
52 |
# File 'lib/moku6/event.rb', line 52 def to_h = data |
#visibility ⇒ Object
: () -> untyped
43 |
# File 'lib/moku6/event.rb', line 43 def visibility = data["visibility"] |