tickle changed an instance variable?
Closed this issue · 3 comments
Before I use @recurring_natural_language, the value is 'every day'
After that instance variable is used as a parameter for Tickle, it changes to 'day'....
[4] pry(#)> @recurring_natural_language
=> "every day"
[5] pry(#)> next
From: /home/nitrous/code/site/iron.io/refactor_schedule_kaya.rb @ line 150 ScheduleKaya#add_next_occurrence:
143: def add_next_occurrence #need to REFACTOR for NON-DAILY
144:
145: binding.pry
146: start = Chronic.parse("today at #{@time_string}")
147:
148: tickle = Tickle.parse(@recurring_natural_language, {:start => start})
149:
=> 150: @next_occurrence = tickle[:next]
151:
152:
153: end
[5] pry(#)> @recurring_natural_language
=> "day"
I see, perhaps by design? was throwing my rspecs off
Hi @angelacode
I've made a slight change to the Tickle.parse
method so it dup
s the string before doing any work on it. I've pushed it to the issue-8-asked-clobbered
branch, please try it out and see if that helps.
regards,
iain
No response, but I'll merge with next release regardless. Closed.