Class: UnderOs::UI::Size

Inherits:
Point
  • Object
show all
Defined in:
lib/under_os/ui/utils/size.rb

Instance Method Summary collapse

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

#xObject



6
7
8
# File 'lib/under_os/ui/utils/size.rb', line 6

def x
  @view.style.width
end

#x=(size) ⇒ Object



10
11
12
# File 'lib/under_os/ui/utils/size.rb', line 10

def x=(size)
  @view.style.width = size
end

#yObject



14
15
16
# File 'lib/under_os/ui/utils/size.rb', line 14

def y
  @view.style.height
end

#y=(size) ⇒ Object



18
19
20
# File 'lib/under_os/ui/utils/size.rb', line 18

def y=(size)
  @view.style.height = size
end