Class: RIView
- Inherits:
-
Object
- Object
- RIView
- Defined in:
- lib/RIUI/RIView.rb
Instance Attribute Summary collapse
-
#background_color ⇒ Object
Returns the value of attribute background_color.
-
#height ⇒ Object
Returns the value of attribute height.
-
#title ⇒ Object
Returns the value of attribute title.
-
#width ⇒ Object
Returns the value of attribute width.
Class Method Summary collapse
Instance Attribute Details
#background_color ⇒ Object
Returns the value of attribute background_color.
3 4 5 |
# File 'lib/RIUI/RIView.rb', line 3 def background_color @background_color end |
#height ⇒ Object
Returns the value of attribute height.
3 4 5 |
# File 'lib/RIUI/RIView.rb', line 3 def height @height end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/RIUI/RIView.rb', line 3 def title @title end |
#width ⇒ Object
Returns the value of attribute width.
3 4 5 |
# File 'lib/RIUI/RIView.rb', line 3 def width @width end |
Class Method Details
.exit ⇒ Object
15 16 17 18 |
# File 'lib/RIUI/RIView.rb', line 15 def self.exit extend Ruby2D::DSL close end |
.initialize(opts = {}) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/RIUI/RIView.rb', line 4 def self.initialize(opts = {}) @width = opts[:width] || 250 @height = opts[:height] || 300 @background_color = opts[:background_color] || 'white' @title = opts[:title] || "RIUI View" end |
.show ⇒ Object
10 11 12 13 14 |
# File 'lib/RIUI/RIView.rb', line 10 def self.show extend Ruby2D::DSL set width: @width, height: @height, background: @background_color, title: @title show end |