lib/skiplan_client/metrics.rb in skiplan_client-0.1.2 vs lib/skiplan_client/metrics.rb in skiplan_client-0.1.3
- old
+ new
@@ -3,11 +3,11 @@
class Metrics
include AttributeHelper
- METRICS = ['SKI_NUIT', 'KM_SKATING', 'SKI_ALPIN', 'SKI_ALPIN_VERTES', 'SKI_ALPIN_BLEUES', 'SKI_ALPIN_ROUGES', 'SKI_ALPIN_NOIRES',
+ METRICS = ['ETAT_ROUTE', 'SKI_NUIT', 'KM_SKATING', 'SKI_ALPIN', 'SKI_ALPIN_VERTES', 'SKI_ALPIN_BLEUES', 'SKI_ALPIN_ROUGES', 'SKI_ALPIN_NOIRES',
'SKI_NORDIQUE', 'SKI_NORDIQUE_VERTES', 'SKI_NORDIQUE_BLEUES', 'SKI_NORDIQUE_ROUGES', 'SKI_NORDIQUE_NOIRES',
'REMONTEES', 'PIETONS', 'RAQUETTES', 'LUGE', 'SNOWPARK']
def initialize(attributes)
self.attributes = attributes.keep_if {|k, v| METRICS.include?(k)} unless attributes.nil?
@@ -60,9 +60,13 @@
@SKI_NUIT && @SKI_NUIT['etat'] == '1'
end
def skating
@KM_SKATING['ouvert'] unless @KM_SKATING.nil?
+ end
+
+ def roads
+ @ETAT_ROUTE['lib']
end
private
def get_ratio(hash)
\ No newline at end of file