Class: Integer
- Inherits:
- 
      Object
      
        - Object
- Integer
 
- Defined in:
- lib/openhab/core_ext/ruby/numeric.rb
Overview
Extensions to Integer
Instance Method Summary collapse
- 
  
    
      #days  ⇒ Period 
    
    
      (also: #day)
    
  
  
  
  
  
  
  
  
  
    Create Period of selfdays.
- 
  
    
      #hours  ⇒ Duration 
    
    
      (also: #hour)
    
  
  
  
  
  
  
  
  
  
    Create Duration of selfhours.
- 
  
    
      #milliseconds  ⇒ Duration 
    
    
      (also: #millisecond, #ms)
    
  
  
  
  
  
  
  
  
  
    Create Duration of selfmilliseconds.
- 
  
    
      #minutes  ⇒ Duration 
    
    
      (also: #minute)
    
  
  
  
  
  
  
  
  
  
    Create Duration of selfminutes.
- 
  
    
      #months  ⇒ Period 
    
    
      (also: #month)
    
  
  
  
  
  
  
  
  
  
    Create Period of selfmonths.
- 
  
    
      #seconds  ⇒ Duration 
    
    
      (also: #second)
    
  
  
  
  
  
  
  
  
  
    Create Duration of selfseconds.
- 
  
    
      #years  ⇒ Period 
    
    
      (also: #year)
    
  
  
  
  
  
  
  
  
  
    Create Period of selfyears.
Methods included from OpenHAB::CoreExt::Ruby::QuantityTypeConversion
Instance Method Details
#days ⇒ Period Also known as: day
Create Period of self days
| 57 | # File 'lib/openhab/core_ext/ruby/numeric.rb', line 57 def_period_method(:days) | 
#hours ⇒ Duration Also known as: hour
Create Duration of self hours
| 55 | # File 'lib/openhab/core_ext/ruby/numeric.rb', line 55 def_duration_method(:hours) | 
#milliseconds ⇒ Duration Also known as: millisecond, ms
Create Duration of self milliseconds
| 46 47 48 | # File 'lib/openhab/core_ext/ruby/numeric.rb', line 46 def milliseconds Duration.of_millis(self) end | 
#minutes ⇒ Duration Also known as: minute
Create Duration of self minutes
| 53 | # File 'lib/openhab/core_ext/ruby/numeric.rb', line 53 def_duration_method(:minutes) | 
#months ⇒ Period Also known as: month
Create Period of self months
| 59 | # File 'lib/openhab/core_ext/ruby/numeric.rb', line 59 def_period_method(:months) | 
 
          