Class: WEEL::Position
- Inherits:
-
Object
- Object
- WEEL::Position
- Defined in:
- lib/weel.rb
Overview
}}}
Instance Attribute Summary collapse
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#passthrough ⇒ Object
Returns the value of attribute passthrough.
-
#position ⇒ Object
readonly
{{{.
-
#uuid ⇒ Object
readonly
{{{.
Instance Method Summary collapse
- #as_json ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(position, uuid, detail = :at, passthrough = nil) ⇒ Position
constructor
:at or :after or :unmark.
- #to_json(*args) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(position, uuid, detail = :at, passthrough = nil) ⇒ Position
:at or :after or :unmark
389 390 391 392 393 394 |
# 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 |
Instance Attribute Details
#detail ⇒ Object
Returns the value of attribute detail.
388 389 390 |
# File 'lib/weel.rb', line 388 def detail @detail end |
#passthrough ⇒ Object
Returns the value of attribute passthrough.
388 389 390 |
# File 'lib/weel.rb', line 388 def passthrough @passthrough end |
#position ⇒ Object (readonly)
{{{
387 388 389 |
# File 'lib/weel.rb', line 387 def position @position end |
#uuid ⇒ Object (readonly)
{{{
387 388 389 |
# File 'lib/weel.rb', line 387 def uuid @uuid end |
Instance Method Details
#as_json ⇒ Object
395 396 397 398 399 |
# File 'lib/weel.rb', line 395 def as_json(*) jsn = { 'position' => @position, 'uuid' => @uuid } jsn['passthrough'] = @passthrough if @passthrough jsn end |
#eql?(other) ⇒ Boolean
406 407 408 |
# File 'lib/weel.rb', line 406 def eql?(other) to_s == other.to_s end |
#hash ⇒ Object
409 410 411 |
# File 'lib/weel.rb', line 409 def hash to_s.hash end |
#to_json(*args) ⇒ Object
403 404 405 |
# File 'lib/weel.rb', line 403 def to_json(*args) as_json.to_json(*args) end |
#to_s ⇒ Object
400 401 402 |
# File 'lib/weel.rb', line 400 def to_s as_json.to_s end |