Class: LogStash::Modules::KibanaBase
- Inherits:
-
Object
- Object
- LogStash::Modules::KibanaBase
show all
- Defined in:
- lib/logstash/modules/kibana_base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(import_path, content) ⇒ KibanaBase
7
8
9
|
# File 'lib/logstash/modules/kibana_base.rb', line 7
def initialize(import_path, content)
@import_path, @content = import_path, content
end
|
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
5
6
7
|
# File 'lib/logstash/modules/kibana_base.rb', line 5
def content
@content
end
|
#import_path ⇒ Object
Returns the value of attribute import_path.
5
6
7
|
# File 'lib/logstash/modules/kibana_base.rb', line 5
def import_path
@import_path
end
|
Instance Method Details
#content_as_object ⇒ Object
19
20
21
22
|
# File 'lib/logstash/modules/kibana_base.rb', line 19
def content_as_object
return content unless content.is_a?(String)
LogStash::Json.load(content) rescue nil
end
|
#import(client) ⇒ Object
11
12
13
|
# File 'lib/logstash/modules/kibana_base.rb', line 11
def import(client)
raise NotImplementedError, "#{self.class.name} needs to implement `#import`"
end
|
#to_s ⇒ Object
15
16
17
|
# File 'lib/logstash/modules/kibana_base.rb', line 15
def to_s
import_path
end
|