Class: Mac::EventMonitor::Location

Inherits:
Object
  • Object
show all
Includes:
JsonSerializable
Defined in:
lib/mac-event-monitor/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from JsonSerializable

included, #to_json

Constructor Details

#initialize(x, y) ⇒ Location

Returns a new instance of Location.



8
9
10
11
# File 'lib/mac-event-monitor/location.rb', line 8

def initialize(x, y)
  @x = x
  @y = y
end

Instance Attribute Details

#xObject

Returns the value of attribute x.



6
7
8
# File 'lib/mac-event-monitor/location.rb', line 6

def x
  @x
end

#yObject

Returns the value of attribute y.



6
7
8
# File 'lib/mac-event-monitor/location.rb', line 6

def y
  @y
end

Instance Method Details

#dataObject



13
14
15
# File 'lib/mac-event-monitor/location.rb', line 13

def data
  [x, y]
end