class Object
Public Instance Methods
is?(other_object)
click to toggle source
# File lib/awein/object.rb, line 24 def is?(other_object) self == other_object end
is_not?(other_object)
click to toggle source
# File lib/awein/object.rb, line 28 def is_not?(other_object) self != other_object end
rcall(*args)
click to toggle source
# File lib/awein/object.rb, line 11 def rcall(*args) options = {:d => nil}.merge(args.last.is_a?(Hash) ? args.pop : {}) target = self while target && m = args.shift target = target.send(m) if target.respond_to?(m) end return target if target return options[:d].call if options[:d].respond_to? :call return options[:d] end
to_hms()
click to toggle source
# File lib/awein/object.rb, line 3 def to_hms Time.at(self.to_f).utc.strftime("%H:%M:%S") end
to_normal_time()
click to toggle source
# File lib/awein/object.rb, line 7 def to_normal_time self.strftime("%H:%M %p") end