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