class UncleKryon::BaseData
Attributes
updated_on[RW]
Public Class Methods
max_updated_on(data)
click to toggle source
# File lib/unclekryon/data/base_data.rb, line 46 def self.max_updated_on(data) max = nil if data.is_a?(Hash) data.each do |k,v| vuo = Util.parse_datetime_s(v.updated_on) max = vuo if max.nil? || vuo > max end end return max end
max_updated_on_s(data)
click to toggle source
# File lib/unclekryon/data/base_data.rb, line 63 def self.max_updated_on_s(data) return Util.format_datetime(max_updated_on(data)) end
new()
click to toggle source
# File lib/unclekryon/data/base_data.rb, line 20 def initialize update end
Public Instance Methods
initialize_copy(original)
click to toggle source
Calls superclass method
# File lib/unclekryon/data/base_data.rb, line 24 def initialize_copy(original) super(original) @updated_on = @updated_on.clone end
max_updated_on()
click to toggle source
# File lib/unclekryon/data/base_data.rb, line 35 def max_updated_on max = nil instance_variables.each do |iv| vuo = Util.parse_datetime_s(instance_variable_get(iv)) if iv.to_s =~ /\A@updated_.+_on\z/ max = vuo if max.nil? || vuo > max end return max end
max_updated_on_s()
click to toggle source
# File lib/unclekryon/data/base_data.rb, line 59 def max_updated_on_s return Util.format_datetime(max_updated_on) end
update()
click to toggle source
# File lib/unclekryon/data/base_data.rb, line 30 def update @updated_on = Util.format_datetime(DateTime.now) return @updated_on end