Class: Source::Bom

Inherits:
Source
  • Object
show all
Includes:
Helpers
Defined in:
lib/source/bom.rb

Constant Summary collapse

BOM_VALUE =
{
	"wind_spd_kmh"  => "Wind Speed, km/h", 
     	"delta_t"       => "Wet Bulb Depression, degrees Celsius",
	"gust_kmh"      => "Wind Gust, km/h",
	"rain_trace"    => "Rain since 9am",
	"rel_hum"       => "Relative Humidity",
	"apparent_t"    => "Apparent Temperature",
	"air_temp"      => "Temperature"
}

Constants included from Helpers

Helpers::REDIS_KEY

Instance Method Summary collapse

Methods included from Helpers

#data_sanitize, #delete_metrics_cache, #get_json, #init_lib, #init_source, #init_store, #interpolate, #is_up?, #json_metrics, #json_metrics_list, #keysplit, #mandatory_param, #optional_param, #origin_settings, #redis_conn, #top_tail_pad

Instance Method Details

#titleize(metric) ⇒ Object


14
15
16
17
18
# File 'lib/source/bom.rb', line 14

def titleize metric
	site, met = metric.split("-")
	return [site.titleize, BOM_VALUE[met]].join(" - ")	

end