Class: IceT::Rule::Daily

Inherits:
Base
  • Object
show all
Defined in:
lib/ice_t/rule/daily.rb

Instance Attribute Summary

Attributes inherited from Base

#at, #interval

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

<=>, #<=>, #initialize, #occurrences

Constructor Details

This class inherits a constructor from IceT::Rule::Base

Class Method Details

.to_iObject



5
# File 'lib/ice_t/rule/daily.rb', line 5

def to_i; 1.day.to_i end

.unitObject



6
# File 'lib/ice_t/rule/daily.rb', line 6

def unit; :days end

Instance Method Details

#to_sObject



9
10
11
12
13
# File 'lib/ice_t/rule/daily.rb', line 9

def to_s
  word = (@interval.eql?(2))? 'zweiten' : @interval
  # "jeden #{@interval} tage"
  "jeden #{word} tag"
end