ice_cube 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,17 +15,21 @@ module IceCube
15
15
  # Convert the schedule to a hash, reverse of Schedule.from_hash
16
16
  def to_hash
17
17
  hash = Hash.new
18
- hash[:start_date] = TimeUtil.serializable_time(@start_date)
18
+ hash[:start_date] = @start_date
19
19
  hash[:rrules] = @rrule_occurrence_heads.map { |rr| rr.rule.to_hash }
20
20
  hash[:exrules] = @exrule_occurrence_heads.map { |ex| ex.rule.to_hash }
21
- hash[:rdates] = @rdates.map { |t| TimeUtil.serializable_time(t) }
22
- hash[:exdates] = @exdates.map { |t| TimeUtil.serializable_time(t) }
21
+ hash[:rdates] = @rdates
22
+ hash[:exdates] = @exdates
23
23
  hash
24
24
  end
25
25
 
26
26
  # Convert the schedule to yaml, reverse of Schedule.from_yaml
27
27
  def to_yaml
28
- to_hash.to_yaml
28
+ hash = to_hash
29
+ hash[:start_date] = TimeUtil.serializable_time(hash[:start_date])
30
+ hash[:rdates] = hash[:rdates].map { |t| TimeUtil.serializable_time(t) }
31
+ hash[:exdates] = hash[:exdates].map { |t| TimeUtil.serializable_time(t) }
32
+ hash.to_yaml
29
33
  end
30
34
 
31
35
  # Create a schedule from a hash created by instance.to_hash
@@ -1,5 +1,5 @@
1
1
  module IceCube
2
2
 
3
- VERSION = "0.3.4"
3
+ VERSION = "0.3.5"
4
4
 
5
5
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 4
9
- version: 0.3.4
8
+ - 5
9
+ version: 0.3.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Crepezzi
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-29 00:00:00 -04:00
17
+ date: 2010-04-30 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency