Class: LogStash::Api::Modules::Base

Inherits:
Sinatra::Base
  • Object
show all
Includes:
Util::Loggable
Defined in:
lib/logstash/api/modules/base.rb

Direct Known Subclasses

Logging, Node, NodeStats, Plugins, Root, Stats

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app = nil, agent) ⇒ Base

Returns a new instance of Base.



27
28
29
30
31
# File 'lib/logstash/api/modules/base.rb', line 27

def initialize(app=nil, agent)
  super(app)
  @agent = agent
  @factory = ::LogStash::Api::CommandFactory.new(LogStash::Api::Service.new(agent))
end

Instance Attribute Details

#agentObject (readonly)

Returns the value of attribute agent.



21
22
23
# File 'lib/logstash/api/modules/base.rb', line 21

def agent
  @agent
end

#factoryObject (readonly)

Returns the value of attribute factory.



21
22
23
# File 'lib/logstash/api/modules/base.rb', line 21

def factory
  @factory
end