Methods

Class/Module Index [+]

Quicksearch

Fog::Attributes::Time

Public Instance Methods

create_setter() click to toggle source
# File lib/fog/core/attributes/time.rb, line 4
def create_setter
  model.class_eval             def #{name}=(new_#{name})              attributes[:#{name}] = if new_#{name}.nil? || new_#{name} == "" || new_#{name}.is_a?(::Time)                new_#{name}              elsif new_#{name}.respond_to?(:to_time)                new_#{name}.to_time              else                ::Time.parse(new_#{name})              end            end, __FILE__, __LINE__
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.