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.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
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
#initialize(id, geo) ⇒ Screen
Returns a new instance of Screen.
12 13 14 15 16 |
# File 'lib/uh/layout/screen.rb', line 12 def initialize(id, geo) @id = id @geo = geo.dup = Container.new([Tag.new('1', @geo)]) end |
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 |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
10 11 12 |
# File 'lib/uh/layout/screen.rb', line 10 def 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 .each { |tag| tag.height = value } end |
#include?(client) ⇒ Boolean
27 28 29 |
# File 'lib/uh/layout/screen.rb', line 27 def include?(client) .any? { |tag| tag.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 |