Class: Integer
- Inherits:
-
Object
- Object
- Integer
- Defined in:
- lib/osb/integer.rb
Instance Method Summary collapse
-
#ms ⇒ Integer
Does nothing.
-
#percent ⇒ Float
Convert from percentage to float.
-
#second ⇒ Integer
Convert from seconds to milliseconds.
Instance Method Details
#ms ⇒ Integer
Does nothing. Just a way to tell people it’s represented in milliseconds.
4 5 6 |
# File 'lib/osb/integer.rb', line 4 def ms self end |
#percent ⇒ Float
Convert from percentage to float.
16 17 18 |
# File 'lib/osb/integer.rb', line 16 def percent self / 100.0 end |
#second ⇒ Integer
Convert from seconds to milliseconds.
10 11 12 |
# File 'lib/osb/integer.rb', line 10 def second self * 1000 end |