class Harvest::TimeEntry
Public Class Methods
new(args = {}, _ = nil)
click to toggle source
Calls superclass method
# File lib/harvest/time_entry.rb, line 9 def initialize(args = {}, _ = nil) args = args.to_hash.stringify_keys self.spent_at = args.delete("spent_at") if args["spent_at"] super end
Public Instance Methods
as_json(args = {})
click to toggle source
Calls superclass method
# File lib/harvest/time_entry.rb, line 19 def as_json(args = {}) super(args).to_hash.stringify_keys.tap do |hash| hash.update("spent_at" => (spent_at.nil? ? nil : spent_at.xmlschema)) end end
spent_at=(date)
click to toggle source
# File lib/harvest/time_entry.rb, line 15 def spent_at=(date) self["spent_at"] = Date.parse(date.to_s) end