Class: Moon::Indexable::IndexEvent

Inherits:
Event show all
Defined in:
lib/moon/packages/render_primitives/indexable.rb

Overview

Event triggered when an Indexable object changes its index, note that this will be triggered EVEN if the index was the same

Instance Attribute Summary collapse

Attributes inherited from Event

#id, #type

Instance Method Summary collapse

Methods inherited from Event

make_filter

Constructor Details

#initialize(state, index) ⇒ IndexEvent


10
11
12
13
14
# File 'lib/moon/packages/render_primitives/indexable.rb', line 10

def initialize(state, index)
  @state = state
  @index = index
  super :index
end

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index


8
9
10
# File 'lib/moon/packages/render_primitives/indexable.rb', line 8

def index
  @index
end

#stateObject (readonly)

Returns the value of attribute state


7
8
9
# File 'lib/moon/packages/render_primitives/indexable.rb', line 7

def state
  @state
end