Class: Numeric
- Inherits:
-
Object
- Object
- Numeric
- Defined in:
- lib/vector_salad/monkeypatches.rb
Overview
Monkeypatches to core Ruby Fixnum class
Class Method Summary collapse
-
.unit=(unit) ⇒ Object
Set the global unit value for multiplying numbers by using tilde (~) to scale designs.
Instance Method Summary collapse
-
#unit ⇒ Object
Get unit value.
Class Method Details
.unit=(unit) ⇒ Object
Set the global unit value for multiplying numbers by using tilde (~) to scale designs
11 12 13 |
# File 'lib/vector_salad/monkeypatches.rb', line 11 def self.unit=(unit) @@unit = unit end |
Instance Method Details
#unit ⇒ Object
Get unit value
4 5 6 |
# File 'lib/vector_salad/monkeypatches.rb', line 4 def unit @@unit ||= 1 end |