Class: UnderOs::UI::Position
- Inherits:
-
Point
- Object
- Point
- UnderOs::UI::Position
show all
- Defined in:
- lib/under_os/ui/utils/position.rb
Instance Method Summary
collapse
Methods inherited from Point
#*, #/, #==, #inspect, #to_s
Constructor Details
#initialize(view) ⇒ Position
Returns a new instance of Position.
2
3
4
|
# File 'lib/under_os/ui/utils/position.rb', line 2
def initialize(view)
@view = view
end
|
Instance Method Details
#x ⇒ Object
6
7
8
|
# File 'lib/under_os/ui/utils/position.rb', line 6
def x
@view.style.left
end
|
#x=(position) ⇒ Object
10
11
12
|
# File 'lib/under_os/ui/utils/position.rb', line 10
def x=(position)
@view.style.left = position
end
|
#y ⇒ Object
14
15
16
|
# File 'lib/under_os/ui/utils/position.rb', line 14
def y
@view.style.top
end
|
#y=(position) ⇒ Object
18
19
20
|
# File 'lib/under_os/ui/utils/position.rb', line 18
def y=(position)
@view.style.top = position
end
|