{"action":"opened","issue":{"url":"https://api.github.com/repos/seejohnrun/ice_cube/issues/282","labels_url":"https://api.github.com/repos/seejohnrun/ice_cube/issues/282/labels{/name}","comments_url":"https://api.github.com/repos/seejohnrun/ice_cube/issues/282/comments","events_url":"https://api.github.com/repos/seejohnrun/ice_cube/issues/282/events","html_url":"https://github.com/seejohnrun/ice_cube/issues/282","id":57686785,"number":282,"title":"Implement (override) hash method and supply hash serializer","user":{"login":"voltechs","id":1700514,"avatar_url":"https://avatars.githubusercontent.com/u/1700514?v=3","gravatar_id":"","url":"https://api.github.com/users/voltechs","html_url":"https://github.com/voltechs","followers_url":"https://api.github.com/users/voltechs/followers","following_url":"https://api.github.com/users/voltechs/following{/other_user}","gists_url":"https://api.github.com/users/voltechs/gists{/gist_id}","starred_url":"https://api.github.com/users/voltechs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voltechs/subscriptions","organizations_url":"https://api.github.com/users/voltechs/orgs","repos_url":"https://api.github.com/users/voltechs/repos","events_url":"https://api.github.com/users/voltechs/events{/privacy}","received_events_url":"https://api.github.com/users/voltechs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-14T08:50:57Z","updated_at":"2015-02-14T08:50:57Z","closed_at":null,"body":"IceCube::Schedule should implement the :hash method so that in-place modifications (rails) are sense, and can be saved.\r\n\r\nAlso, a native hash serializer would be nice. YAML is slower and (IMHO) not any easier to read than a hash.\r\n\r\n```\r\n  class IceCube::Hasher\r\n    def self.dump(schedule)\r\n      return {} if schedule.blank?\r\n      schedule.to_hash\r\n    end\r\n\r\n    def self.load(hash)\r\n      hash = {} if hash.blank?\r\n      return IceCube::Schedule.from_yaml(hash) if !!(hash =~ /\\A---/)\r\n      IceCube::Schedule.from_hash(hash)\r\n    end\r\n  end\r\n```"}}