Class: Rack::Ketai::Display
- Inherits:
-
Object
- Object
- Rack::Ketai::Display
- Defined in:
- lib/rack/ketai/display.rb
Instance Attribute Summary collapse
-
#colors ⇒ Object
readonly
Returns the value of attribute colors.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(data = { }) ⇒ Display
constructor
:nodoc:.
Constructor Details
#initialize(data = { }) ⇒ Display
:nodoc:
10 11 12 13 14 |
# File 'lib/rack/ketai/display.rb', line 10 def initialize(data = { }) # :nodoc: @colors = data[:colors].to_i == 0 ? nil : data[:colors].to_i @width = data[:width].to_i == 0 ? nil : data[:width].to_i @height = data[:height].to_i == 0 ? nil : data[:height].to_i end |
Instance Attribute Details
#colors ⇒ Object (readonly)
Returns the value of attribute colors.
8 9 10 |
# File 'lib/rack/ketai/display.rb', line 8 def colors @colors end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
8 9 10 |
# File 'lib/rack/ketai/display.rb', line 8 def height @height end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
8 9 10 |
# File 'lib/rack/ketai/display.rb', line 8 def width @width end |