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.
6 7 8 |
# File 'lib/osb/integer.rb', line 6 def ms self end |
#percent ⇒ Float
Convert from percentage to float.
18 19 20 |
# File 'lib/osb/integer.rb', line 18 def percent self / 100.0 end |
#second ⇒ Integer
Convert from seconds to milliseconds.
12 13 14 |
# File 'lib/osb/integer.rb', line 12 def second self * 1000 end |