Class: IngestElement
- Inherits:
-
Object
- Object
- IngestElement
- Defined in:
- lib/netuitive/ingest_element.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#id ⇒ Object
Returns the value of attribute id.
-
#location ⇒ Object
Returns the value of attribute location.
-
#metrics ⇒ Object
Returns the value of attribute metrics.
-
#name ⇒ Object
Returns the value of attribute name.
-
#samples ⇒ Object
Returns the value of attribute samples.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(id, name, type, location, metrics, samples, tags, attributes) ⇒ IngestElement
constructor
A new instance of IngestElement.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(id, name, type, location, metrics, samples, tags, attributes) ⇒ IngestElement
Returns a new instance of IngestElement.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/netuitive/ingest_element.rb', line 4 def initialize(id, name, type, location, metrics, samples, , attributes) @id=id @name=name @type=type @location=location @metrics=metrics @samples=samples = @attributes=attributes end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/netuitive/ingest_element.rb', line 3 def attributes @attributes end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/netuitive/ingest_element.rb', line 3 def id @id end |
#location ⇒ Object
Returns the value of attribute location.
3 4 5 |
# File 'lib/netuitive/ingest_element.rb', line 3 def location @location end |
#metrics ⇒ Object
Returns the value of attribute metrics.
3 4 5 |
# File 'lib/netuitive/ingest_element.rb', line 3 def metrics @metrics end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/netuitive/ingest_element.rb', line 3 def name @name end |
#samples ⇒ Object
Returns the value of attribute samples.
3 4 5 |
# File 'lib/netuitive/ingest_element.rb', line 3 def samples @samples end |
#tags ⇒ Object
Returns the value of attribute tags.
3 4 5 |
# File 'lib/netuitive/ingest_element.rb', line 3 def end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/netuitive/ingest_element.rb', line 3 def type @type end |
Instance Method Details
#to_json(options = {}) ⇒ Object
14 15 16 |
# File 'lib/netuitive/ingest_element.rb', line 14 def to_json( = {}) {'id' => @id, 'name' => @name, 'type' => @type, 'location' => @location, 'metrics' => @metrics, 'samples' => @samples,'tags' => , 'attributes' => @attributes}.to_json.tr('\\', '') end |