Class: RubyTDMS::Objects::Group
- Defined in:
- lib/ruby_tdms/objects/group.rb
Instance Attribute Summary collapse
-
#channels ⇒ Object
readonly
Returns the value of attribute channels.
Attributes inherited from Base
#path, #properties, #segment, #stream
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(*args) ⇒ Group
constructor
A new instance of Group.
Methods inherited from Base
#continue_stream, #parse_stream
Constructor Details
#initialize(*args) ⇒ Group
Returns a new instance of Group.
9 10 11 12 |
# File 'lib/ruby_tdms/objects/group.rb', line 9 def initialize(*args) super @channels = [] end |
Instance Attribute Details
#channels ⇒ Object (readonly)
Returns the value of attribute channels.
6 7 8 |
# File 'lib/ruby_tdms/objects/group.rb', line 6 def channels @channels end |
Instance Method Details
#as_json ⇒ Object
15 16 17 18 19 |
# File 'lib/ruby_tdms/objects/group.rb', line 15 def as_json super.merge({ channel_count: @channels.length }) end |