Class: LowNode
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
included, #render_template
Constructor Details
#initialize(event: nil) ⇒ LowNode
Returns a new instance of LowNode.
20
21
22
|
# File 'lib/low_node.rb', line 20
def initialize(event: nil)
@event = event
end
|
Instance Attribute Details
#event ⇒ Object
Returns the value of attribute event.
18
19
20
|
# File 'lib/low_node.rb', line 18
def event
@event
end
|
Class Method Details
.count ⇒ Object
39
40
41
|
# File 'lib/low_node.rb', line 39
def count
@count ||= 0
end
|
.handle(event:) ⇒ Object
30
31
32
|
# File 'lib/low_node.rb', line 30
def handle(event:)
new(event:).handle(event:)
end
|
.increase_count ⇒ Object
43
44
45
|
# File 'lib/low_node.rb', line 43
def increase_count
@count = count + 1
end
|
.inherited(child) ⇒ Object
34
35
36
37
|
# File 'lib/low_node.rb', line 34
def inherited(child)
child.include LowType
increase_count
end
|
Instance Method Details
#handle(event:) ⇒ Object
TODO: Rename "handle" method/action to more specific "route" and maybe split out into module too.
25
26
27
|
# File 'lib/low_node.rb', line 25
def handle(event:)
nil
end
|