Top Level Namespace

Defined Under Namespace

Modules: EnergyPlus Classes: Schedule, SchedulesCSV

Instance Method Summary collapse

Instance Method Details

#make_schedule_name(s) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/energyplus/SchedulesCSV.rb', line 24

def make_schedule_name(s)
  schedule_name = s
  schedule_name = schedule_name.gsub(/[A-Z][a-z]/, ' \0').lstrip
  schedule_name = schedule_name.gsub(/[a-z][A-Z]/) {|s| "" << s[0] << " " << s[1]}
  schedule_name = schedule_name.gsub('_', ' ').gsub('-',' ').gsub(',',' ').gsub('()', '')
  schedule_name = schedule_name.split(' ').each{|p| p.capitalize!}.join(' ')
  return schedule_name
end