Sha256: 218cefdea437193ec7fc009ab346da9cbfd105ac2c376fc524fa53cf79ce713f

Contents?: true

Size: 422 Bytes

Versions: 5

Compression:

Stored size: 422 Bytes

Contents

require 'skiplan_client/attribute_helper'

class Zone

  include AttributeHelper

  def initialize(attributes)
    self.attributes = attributes
  end

  def name
    @nom
  end

  def skilifts
    @REMONTEE
  end

  def slopes
    @PISTE
  end

  def ratio(array_field = [])
    open_entries = array_field.select {|r| r['etat'] == 'O'}
    "#{open_entries.length}/#{array_field.length}"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
skiplan_client-0.1.5 lib/skiplan_client/zone.rb
skiplan_client-0.1.4 lib/skiplan_client/zone.rb
skiplan_client-0.1.3 lib/skiplan_client/zone.rb
skiplan_client-0.1.2 lib/skiplan_client/zone.rb
skiplan_client-0.1.1 lib/skiplan_client/zone.rb