Method: SimpleQS::Request::Base#timestamp=

Defined in:
lib/simple_qs/request/base.rb

#timestamp=(time) ⇒ Object

Raises:

  • (ArgumentError)


28
29
30
31
# File 'lib/simple_qs/request/base.rb', line 28

def timestamp=(time)
  raise ArgumentError, "expected Time object, bug got #{time.class.to_s} instead." unless time.kind_of?(Time)
  @timestamp = time.utc.strftime("%Y-%m-%dT%H:%M:%SZ")
end