Closed Intrepidd closed 9 years ago
Mandatory cute kitty lolcommit
I implemented with_config
, any thoughts ?
Good, but I think it would be better with keyword arguments:
def with_config working_hours: self.working_hours, holidays: self.holydays, time_zone: self.timezone
end
So we can override only one of the 3 attributes:
with_config(working_hours: {mon: {'08:00' => '17:00'}}) do
end
And even pass a single hash with the 3 parameters.
with_config(JSON.parse(File.read("config.json"))) do
end
Yes good idea, will do !
On Sun Dec 07 2014 at 4:38:27 PM Adrien Jarthon notifications@github.com wrote:
Good, but I think it would be better with keyword arguments:
def with_config working_hours: self.working_hours, holidays: self.holydays, time_zone: self.timezoneend
So we can override only one of the 3 attributes:
with_config(working_hours: {mon: {'08:00' => '17:00'}}) doend
And even pass a single hash with the 3 parameters.
with_config(JSON.parse(File.read("config.json"))) doend
— Reply to this email directly or view it on GitHub https://github.com/Intrepidd/working_hours/pull/12#issuecomment-65941121 .
Seems good to me :) shall we merge ?
Let's do this :)
On Sun, Dec 28, 2014, 09:47 Adrien Jarthon notifications@github.com wrote:
Seems good to me :) shall we merge ?
— Reply to this email directly or view it on GitHub https://github.com/Intrepidd/working_hours/pull/12#issuecomment-68201671 .
WIP, do not merge yet
Here i'll implement changes proposed in #8, starting now with some more robust validations.
More coming soon