class ActionSet::AttributeValue::TimeWithZoneAdapter
Public Class Methods
new(raw, target)
click to toggle source
# File lib/action_set/attribute_value.rb, line 151 def initialize(raw, target) @raw = raw @target = target end
Public Instance Methods
process()
click to toggle source
# File lib/action_set/attribute_value.rb, line 156 def process return if @raw.is_a? @target return unless @target.eql?(ActiveSupport::TimeWithZone) time_value = ActiveModelAdapter.new(@raw, Time).process return unless time_value.is_a?(Time) return time_value unless time_value.respond_to?(:in_time_zone) time_value.in_time_zone end