Class: Uh::Layout::Screen
- Inherits:
-
Object
- Object
- Uh::Layout::Screen
- Extended by:
- Forwardable
- Includes:
- GeoAccessors
- Defined in:
- lib/uh/layout/screen.rb
Instance Attribute Summary collapse
-
#geo ⇒ Object
readonly
Returns the value of attribute geo.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#views ⇒ Object
readonly
Returns the value of attribute views.
Instance Method Summary collapse
- #height=(value) ⇒ Object
- #include?(client) ⇒ Boolean
-
#initialize(id, geo) ⇒ Screen
constructor
A new instance of Screen.
- #to_s ⇒ Object
Constructor Details
Instance Attribute Details
#geo ⇒ Object (readonly)
Returns the value of attribute geo.
10 11 12 |
# File 'lib/uh/layout/screen.rb', line 10 def geo @geo end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/uh/layout/screen.rb', line 10 def id @id end |
#views ⇒ Object (readonly)
Returns the value of attribute views.
10 11 12 |
# File 'lib/uh/layout/screen.rb', line 10 def views @views end |
Instance Method Details
#height=(value) ⇒ Object
22 23 24 25 |
# File 'lib/uh/layout/screen.rb', line 22 def height= value @geo.height = value @views.each { |view| view.height = value } end |
#include?(client) ⇒ Boolean
27 28 29 |
# File 'lib/uh/layout/screen.rb', line 27 def include? client @views.any? { |view| view.include? client } end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/uh/layout/screen.rb', line 18 def to_s "SCREEN ##{@id}, geo: #{@geo}" end |