Class: Moon::MovedEvent

Inherits:
Event show all
Defined in:
lib/moon/packages/twod/moved_event.rb

Instance Attribute Summary collapse

Attributes inherited from Event

#id, #type

Instance Method Summary collapse

Methods inherited from Event

make_filter

Constructor Details

#initialize(parent, old_position, position) ⇒ MovedEvent

Returns a new instance of MovedEvent.


7
8
9
10
11
12
# File 'lib/moon/packages/twod/moved_event.rb', line 7

def initialize(parent, old_position, position)
  @parent = parent
  @old_position = old_position
  @position = position
  super :moved
end

Instance Attribute Details

#old_positionObject

Returns the value of attribute old_position


4
5
6
# File 'lib/moon/packages/twod/moved_event.rb', line 4

def old_position
  @old_position
end

#parentObject

Returns the value of attribute parent


3
4
5
# File 'lib/moon/packages/twod/moved_event.rb', line 3

def parent
  @parent
end

#positionObject

Returns the value of attribute position


5
6
7
# File 'lib/moon/packages/twod/moved_event.rb', line 5

def position
  @position
end