Class: WEEL::Position
Overview
}}}
Instance Attribute Summary collapse
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#passthrough ⇒ Object
Returns the value of attribute passthrough.
-
#position ⇒ Object
readonly
{{{.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(position, detail = :at, passthrough = nil) ⇒ Position
constructor
:at or :after or :unmark.
- #to_json(*args) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(position, detail = :at, passthrough = nil) ⇒ Position
:at or :after or :unmark
255 256 257 258 259 |
# File 'lib/weel.rb', line 255 def initialize(position, detail=:at, passthrough=nil) # :at or :after or :unmark @position = position @detail = detail @passthrough = passthrough end |
Instance Attribute Details
#detail ⇒ Object
Returns the value of attribute detail.
254 255 256 |
# File 'lib/weel.rb', line 254 def detail @detail end |
#passthrough ⇒ Object
Returns the value of attribute passthrough.
254 255 256 |
# File 'lib/weel.rb', line 254 def passthrough @passthrough end |
#position ⇒ Object (readonly)
{{{
253 254 255 |
# File 'lib/weel.rb', line 253 def position @position end |
Instance Method Details
#as_json ⇒ Object
260 261 262 263 264 |
# File 'lib/weel.rb', line 260 def as_json(*) jsn = { 'position' => @position } jsn['passtrough'] = @passthrough if @passthrough jsn end |
#to_json(*args) ⇒ Object
268 269 270 |
# File 'lib/weel.rb', line 268 def to_json(*args) as_json.to_json(*args) end |
#to_s ⇒ Object
265 266 267 |
# File 'lib/weel.rb', line 265 def to_s as_json.to_s end |