Class: EnergyPlus::Variable

Inherits:
Object
  • Object
show all
Defined in:
lib/energyplus/EsoFile.rb

Instance Method Summary collapse

Constructor Details

#initialize(dictionary_entry, data, timestamps) ⇒ Variable

attr_reader :data



31
32
33
34
35
# File 'lib/energyplus/EsoFile.rb', line 31

def initialize(dictionary_entry,data,timestamps)
  @dictionary_entry = dictionary_entry
  @data = data
  @timestamps = timestamps
end

Instance Method Details

#daysObject



65
66
67
# File 'lib/energyplus/EsoFile.rb', line 65

def days
  @timestamps.map { |entry| entry[1] }
end

#hoursObject



61
62
63
# File 'lib/energyplus/EsoFile.rb', line 61

def hours
  @timestamps.map { |entry| entry[5] }
end

#idObject



45
46
47
# File 'lib/energyplus/EsoFile.rb', line 45

def id
  return @dictionary_entry.id
end

#intervalObject



53
54
55
# File 'lib/energyplus/EsoFile.rb', line 53

def interval
  return @dictionary_entry.interval
end

#keyObject



41
42
43
# File 'lib/energyplus/EsoFile.rb', line 41

def key
  return @dictionary_entry.key
end

#monthsObject



69
70
71
# File 'lib/energyplus/EsoFile.rb', line 69

def months
  @timestamps.map { |entry| entry[2] }
end

#nameObject



37
38
39
# File 'lib/energyplus/EsoFile.rb', line 37

def name
  return @dictionary_entry.var_name
end

#unitsObject



49
50
51
# File 'lib/energyplus/EsoFile.rb', line 49

def units
  return @dictionary_entry.units
end

#valuesObject



57
58
59
# File 'lib/energyplus/EsoFile.rb', line 57

def values
  @data.map { |entry| entry[1] }
end