Class: Senec::Cloud::TechnicalData::Finder

Inherits:
Object
  • Object
show all
Defined in:
lib/senec/cloud/technical_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Finder

Returns a new instance of Finder.



19
20
21
# File 'lib/senec/cloud/technical_data.rb', line 19

def initialize(connection)
  @connection = connection
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



22
23
24
# File 'lib/senec/cloud/technical_data.rb', line 22

def connection
  @connection
end

Instance Method Details

#find(system_id) ⇒ Object



24
25
26
# File 'lib/senec/cloud/technical_data.rb', line 24

def find(system_id)
  TechnicalData.new(connection:, system_id:).tap(&:load_data)
end

#firstObject



28
29
30
# File 'lib/senec/cloud/technical_data.rb', line 28

def first
  find(connection.default_system_id)
end