Class: Binance::Utils::Faraday::Middleware::Timestamp

Inherits:
Struct
  • Object
show all
Defined in:
lib/binance/utils/faraday/middleware/timestamp.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#appObject

Returns the value of attribute app

Returns:

  • (Object)

    the current value of app



9
10
11
# File 'lib/binance/utils/faraday/middleware/timestamp.rb', line 9

def app
  @app
end

Instance Method Details

#call(env) ⇒ Object



10
11
12
13
14
15
# File 'lib/binance/utils/faraday/middleware/timestamp.rb', line 10

def call(env)
  env.url.query = Url.add_param(
    env.url.query, 'timestamp', DateTime.now.strftime('%Q')
  )
  app.call env
end