Class: RubyTDMS::Objects::Group

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_tdms/objects/group.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#path, #properties, #segment, #stream

Instance Method Summary collapse

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

#channelsObject (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_jsonObject



15
16
17
18
19
# File 'lib/ruby_tdms/objects/group.rb', line 15

def as_json
	super.merge({
		channel_count: @channels.length
	})
end