Class: Motion::IconGenerator::Size
- Inherits:
-
Object
- Object
- Motion::IconGenerator::Size
- Defined in:
- lib/motion/icon_generator/size.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#scale ⇒ Object
readonly
Returns the value of attribute scale.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Instance Method Summary collapse
- #actual_height ⇒ Object
- #actual_width ⇒ Object
-
#initialize(attributes) ⇒ Size
constructor
A new instance of Size.
Constructor Details
#initialize(attributes) ⇒ Size
12 13 14 15 16 |
# File 'lib/motion/icon_generator/size.rb', line 12 def initialize(attributes) for key, value in attributes instance_variable_set("@#{key}", value) end end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/motion/icon_generator/size.rb', line 7 def name @name end |
#scale ⇒ Object (readonly)
Returns the value of attribute scale.
9 10 11 |
# File 'lib/motion/icon_generator/size.rb', line 9 def scale @scale end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
8 9 10 |
# File 'lib/motion/icon_generator/size.rb', line 8 def size @size end |
Instance Method Details
#actual_height ⇒ Object
22 23 24 |
# File 'lib/motion/icon_generator/size.rb', line 22 def actual_height scale * size end |
#actual_width ⇒ Object
18 19 20 |
# File 'lib/motion/icon_generator/size.rb', line 18 def actual_width scale * size end |