Class: Px4LogReader::Context
- Inherits:
-
Object
- Object
- Px4LogReader::Context
- Defined in:
- lib/px4_log_reader/reader.rb
Instance Attribute Summary collapse
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
Instance Method Summary collapse
- #find_by_name(name) ⇒ Object
- #find_by_type(type) ⇒ Object
-
#initialize ⇒ Context
constructor
A new instance of Context.
- #set(message) ⇒ Object
Constructor Details
#initialize ⇒ Context
Returns a new instance of Context.
70 71 72 |
# File 'lib/px4_log_reader/reader.rb', line 70 def initialize = {} end |
Instance Attribute Details
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
69 70 71 |
# File 'lib/px4_log_reader/reader.rb', line 69 def end |
Instance Method Details
#find_by_name(name) ⇒ Object
73 74 75 76 77 78 79 80 81 |
# File 'lib/px4_log_reader/reader.rb', line 73 def find_by_name( name ) = nil .values.each do || if .descriptor.name == name = end end return end |
#find_by_type(type) ⇒ Object
82 83 84 |
# File 'lib/px4_log_reader/reader.rb', line 82 def find_by_type( type ) return [ type ] end |
#set(message) ⇒ Object
85 86 87 |
# File 'lib/px4_log_reader/reader.rb', line 85 def set( ) [ .descriptor.type ] = .dup end |