Class: ButtonModel
- Inherits:
-
Object
- Object
- ButtonModel
- Defined in:
- lib/glimmer-dsl-web/samples/hello/hello_style.rb
Constant Summary collapse
- WIDTH_MIN =
160- WIDTH_MAX =
960- HEIGHT_MIN =
100- HEIGHT_MAX =
600- FONT_SIZE_MIN =
40- FONT_SIZE_MAX =
200
Instance Attribute Summary collapse
-
#font_size ⇒ Object
Returns the value of attribute font_size.
-
#height ⇒ Object
Returns the value of attribute height.
-
#pushed ⇒ Object
Returns the value of attribute pushed.
-
#text ⇒ Object
Returns the value of attribute text.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize ⇒ ButtonModel
constructor
A new instance of ButtonModel.
- #push ⇒ Object
Constructor Details
#initialize ⇒ ButtonModel
Returns a new instance of ButtonModel.
34 35 36 37 38 39 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_style.rb', line 34 def initialize @text = 'Push' @width = WIDTH_MIN @height = HEIGHT_MIN @font_size = FONT_SIZE_MIN end |
Instance Attribute Details
#font_size ⇒ Object
Returns the value of attribute font_size.
32 33 34 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_style.rb', line 32 def font_size @font_size end |
#height ⇒ Object
Returns the value of attribute height.
32 33 34 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_style.rb', line 32 def height @height end |
#pushed ⇒ Object
Returns the value of attribute pushed.
32 33 34 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_style.rb', line 32 def pushed @pushed end |
#text ⇒ Object
Returns the value of attribute text.
32 33 34 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_style.rb', line 32 def text @text end |
#width ⇒ Object
Returns the value of attribute width.
32 33 34 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_style.rb', line 32 def width @width end |
Instance Method Details
#push ⇒ Object
41 42 43 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_style.rb', line 41 def push self.pushed = !pushed end |