Class: TED::Spyder::Group
- Inherits:
-
Object
- Object
- TED::Spyder::Group
- Defined in:
- lib/ted/spyder/group.rb
Instance Attribute Summary collapse
-
#cts ⇒ Object
readonly
An Array of CTs that compose this Group.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#index ⇒ Object
readonly
The one-based index of this Group in the entire ECC.
-
#spyder ⇒ Object
readonly
The Spyder this Group belongs to.
Instance Method Summary collapse
-
#current ⇒ Object
Current data for this Group.
- #history(interval: :minutes, offset: nil, limit: nil, date_range: nil, start_time: nil, end_time: nil) ⇒ Object
-
#initialize(index, description, cts) ⇒ Group
constructor
A new instance of Group.
-
#inspect ⇒ Object
:nodoc:.
Constructor Details
#initialize(index, description, cts) ⇒ Group
Returns a new instance of Group.
12 13 14 |
# File 'lib/ted/spyder/group.rb', line 12 def initialize(index, description, cts) @index, @description, @cts = index, description, cts end |
Instance Attribute Details
#cts ⇒ Object (readonly)
An Array of CTs that compose this Group
10 11 12 |
# File 'lib/ted/spyder/group.rb', line 10 def cts @cts end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
8 9 10 |
# File 'lib/ted/spyder/group.rb', line 8 def description @description end |
#index ⇒ Object (readonly)
The one-based index of this Group in the entire ECC
7 8 9 |
# File 'lib/ted/spyder/group.rb', line 7 def index @index end |
#spyder ⇒ Object (readonly)
The Spyder this Group belongs to
5 6 7 |
# File 'lib/ted/spyder/group.rb', line 5 def spyder @spyder end |
Instance Method Details
#current ⇒ Object
Current data for this Group
17 18 19 |
# File 'lib/ted/spyder/group.rb', line 17 def current spyder.mtu.ecc.current(:spyders)[self] end |
#history(interval: :minutes, offset: nil, limit: nil, date_range: nil, start_time: nil, end_time: nil) ⇒ Object
21 22 23 24 25 |
# File 'lib/ted/spyder/group.rb', line 21 def history(interval: :minutes, offset: nil, limit: nil, date_range: nil, start_time: nil, end_time: nil) offset = ECC.send(:interpret_offsets, offset, limit) date_range = ECC.send(:interpret_dates, date_range, start_time, end_time) spyder.mtu.ecc.send(:history_by_source, self, interval, offset, date_range) end |
#inspect ⇒ Object
:nodoc:
28 29 30 |
# File 'lib/ted/spyder/group.rb', line 28 def inspect "#<TED::Spyder::Group:#{index} #{description} cts=#{cts.inspect}>" end |