Class: Scalingo::Logs

Inherits:
Client show all
Defined in:
lib/scalingo/logs.rb

Constant Summary

Constants included from Request

Request::REQUEST_METHODS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Endpoint

included

Methods included from Endpoint::ClassMethods

#resources

Constructor Details

#initialize(app) ⇒ Logs

Returns a new instance of Logs.



7
8
9
10
11
# File 'lib/scalingo/logs.rb', line 7

def initialize(app)
  super({endpoint: ''})
  self.parse_json = false
  @app = app
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



5
6
7
# File 'lib/scalingo/logs.rb', line 5

def app
  @app
end

Instance Method Details

#dump(lines = 10) ⇒ Object



13
14
15
# File 'lib/scalingo/logs.rb', line 13

def dump(lines = 10)
  get('', n: lines)
end

#realtimeObject



17
18
19
# File 'lib/scalingo/logs.rb', line 17

def realtime
  Scalingo::Realtime::Logs.new(app)
end