Class: Zmanim::Limudim::Limud

Inherits:
Object
  • Object
show all
Defined in:
lib/zmanim/limudim/limud.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(interval, unit) ⇒ Limud



5
6
7
8
# File 'lib/zmanim/limudim/limud.rb', line 5

def initialize(interval, unit)
  @interval = interval
  @unit = unit
end

Instance Attribute Details

#intervalObject (readonly)

Returns the value of attribute interval.



3
4
5
# File 'lib/zmanim/limudim/limud.rb', line 3

def interval
  @interval
end

#unitObject (readonly)

Returns the value of attribute unit.



3
4
5
# File 'lib/zmanim/limudim/limud.rb', line 3

def unit
  @unit
end

Instance Method Details

#cycleObject



10
11
12
# File 'lib/zmanim/limudim/limud.rb', line 10

def cycle
  interval.cycle
end

#cycle_end_dateObject



34
35
36
# File 'lib/zmanim/limudim/limud.rb', line 34

def cycle_end_date
  cycle.end_date
end

#cycle_iterationObject



38
39
40
# File 'lib/zmanim/limudim/limud.rb', line 38

def cycle_iteration
  cycle.iteration
end

#cycle_start_dateObject



30
31
32
# File 'lib/zmanim/limudim/limud.rb', line 30

def cycle_start_date
  cycle.start_date
end

#descriptionObject



14
15
16
# File 'lib/zmanim/limudim/limud.rb', line 14

def description
  unit.to_s
end

#end_dateObject



22
23
24
# File 'lib/zmanim/limudim/limud.rb', line 22

def end_date
  interval.end_date
end

#iterationObject



26
27
28
# File 'lib/zmanim/limudim/limud.rb', line 26

def iteration
  interval.iteration
end

#start_dateObject



18
19
20
# File 'lib/zmanim/limudim/limud.rb', line 18

def start_date
  interval.start_date
end