module SmtpcomApi::Helpers
Public Instance Methods
now()
click to toggle source
# File lib/smtpcom_api/helpers.rb, line 17 def now Time.now end
set_attributes(attributes)
click to toggle source
# File lib/smtpcom_api/helpers.rb, line 11 def set_attributes(attributes) self.class.const_get(:ATTRIBUTES).each do |k| instance_variable_set("@#{k}", attributes[k.to_s]) end end
to_hash()
click to toggle source
# File lib/smtpcom_api/helpers.rb, line 4 def to_hash self.class.const_get(:ATTRIBUTES).inject({}) do |r, k| r.merge k => instance_variable_get("@#{k}") end end
Also aliased as: attributes