Class: Appdash::Event::Base
- Inherits:
-
Object
- Object
- Appdash::Event::Base
- Defined in:
- lib/appdash/event/base.rb
Overview
Base forms the most basic event type
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
-
#initialize(schema, attrs = {}) ⇒ Base
constructor
A new instance of Base.
-
#to_a ⇒ Array<Appdash::CollectPacket::Annotation>
Marshalable annotations.
Constructor Details
#initialize(schema, attrs = {}) ⇒ Base
Returns a new instance of Base.
13 14 15 16 17 |
# File 'lib/appdash/event/base.rb', line 13 def initialize(schema, attrs = {}) super() @schema = schema @attrs = attrs end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
9 10 11 |
# File 'lib/appdash/event/base.rb', line 9 def attrs @attrs end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
9 10 11 |
# File 'lib/appdash/event/base.rb', line 9 def schema @schema end |
Instance Method Details
#to_a ⇒ Array<Appdash::CollectPacket::Annotation>
Returns marshalable annotations.
20 21 22 |
# File 'lib/appdash/event/base.rb', line 20 def to_a annotate(attrs) + [annotation(['_schema', schema].join(':'))] end |