Class: SnapEventBase

Inherits:
SnapItemBase show all
Defined in:
lib/snapshot/snap_event_base.rb

Instance Attribute Summary collapse

Attributes inherited from SnapItemBase

#id, #name, #notes

Instance Method Summary collapse

Methods inherited from SnapItemBase

#init_hash, #init_raw, #init_unpacker, #to_a, #to_h, #to_s, #validate

Constructor Details

#initialize(hash_or_raw) ⇒ SnapEventBase

Returns a new instance of SnapEventBase.



9
10
11
12
13
# File 'lib/snapshot/snap_event_base.rb', line 9

def initialize(hash_or_raw)
  @field_names.prepend(:x)
  @field_names.prepend(:y)
  super
end

Instance Attribute Details

#xObject (readonly)

Returns the value of attribute x.



7
8
9
# File 'lib/snapshot/snap_event_base.rb', line 7

def x
  @x
end

#yObject (readonly)

Returns the value of attribute y.



7
8
9
# File 'lib/snapshot/snap_event_base.rb', line 7

def y
  @y
end