class WEEL::Position

Attributes

detail[RW]
passthrough[RW]
position[R]
uuid[R]

Public Class Methods

new(position, uuid, detail=:at, passthrough=nil) click to toggle source
# File lib/weel.rb, line 389
def initialize(position, uuid, detail=:at, passthrough=nil) # :at or :after or :unmark
  @position = position
  @detail = detail
  @uuid = uuid
  @passthrough = passthrough
end

Public Instance Methods

as_json(*) click to toggle source
# File lib/weel.rb, line 395
def as_json(*)
  jsn = { 'position' => @position, 'uuid' => @uuid }
  jsn['passthrough'] = @passthrough if @passthrough
  jsn
end
eql?(other) click to toggle source
# File lib/weel.rb, line 406
def eql?(other)
  to_s == other.to_s
end
hash() click to toggle source
# File lib/weel.rb, line 409
def hash
  to_s.hash
end
to_json(*args) click to toggle source
# File lib/weel.rb, line 403
def to_json(*args)
  as_json.to_json(*args)
end
to_s() click to toggle source
# File lib/weel.rb, line 400
def to_s
  as_json.to_s
end