Class: Moku6::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/moku6/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (readonly)

: Hash[String, untyped]



6
7
8
# File 'lib/moku6/event.rb', line 6

def data
  @data
end

#source_pathObject (readonly)

: String



7
8
9
# File 'lib/moku6/event.rb', line 7

def source_path
  @source_path
end

Instance Method Details

#actionObject

: () -> String?



16
# File 'lib/moku6/event.rb', line 16

def action = data["action"]

#actorObject

: () -> untyped



31
# File 'lib/moku6/event.rb', line 31

def actor = data["actor"]

#categoryObject

: () -> String?



25
# File 'lib/moku6/event.rb', line 25

def category = data["category"]

#descriptionObject

: () -> String?



22
# File 'lib/moku6/event.rb', line 22

def description = data["description"]

#examplesObject

: () -> Array



49
# File 'lib/moku6/event.rb', line 49

def examples = data["examples"] || []

#fieldsObject

: () -> Hash[String, untyped]



37
# File 'lib/moku6/event.rb', line 37

def fields = data["fields"] || {}

#labelObject

: () -> String?



19
# File 'lib/moku6/event.rb', line 19

def label = data["label"]

#privacyObject

: () -> untyped



40
# File 'lib/moku6/event.rb', line 40

def privacy = data["privacy"]

#required?Boolean

: () -> bool

Returns:

  • (Boolean)


28
# File 'lib/moku6/event.rb', line 28

def required? = !!data["required"]

#retentionObject

: () -> untyped



46
# File 'lib/moku6/event.rb', line 46

def retention = data["retention"]

#targetObject

: () -> untyped



34
# File 'lib/moku6/event.rb', line 34

def target = data["target"]

#to_hObject

: () -> Hash[String, untyped]



52
# File 'lib/moku6/event.rb', line 52

def to_h = data

#visibilityObject

: () -> untyped



43
# File 'lib/moku6/event.rb', line 43

def visibility = data["visibility"]