Sha256: 220b41505390125dead11d8de1495343dc85c33c574a465acac0b7ae0268f315

Contents?: true

Size: 783 Bytes

Versions: 14

Compression:

Stored size: 783 Bytes

Contents

module Access
  class Store
    include Access::MuchMeta

    def self.search(options = {})
      Access::Api.new.search_stores options
    end

    def self.find(store_key, options = {})
      Access::Api.new.find_store store_key, options
    end

    def self.national(options = {})
      Access::Api.new.national_stores options
    end

    def self.process_batch(chunk)
      chunk.map { |store| new(store) }
    end

    def initialize(values)
      @used_fields = []
      set_up_methods(values)
      set_values(values)
      @links = Access::Link.new(@links) if @links
      @store_categories = Access::Category.process_batch(@store_categories) if @store_categories
      @physical_location = Access::Location.new(@physical_location) if @physical_location
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
access-2.3.0.pre.rc2 lib/access/store.rb
access-2.3.0.pre.rc1 lib/access/store.rb
access-2.2.0 lib/access/store.rb
access-2.1.5 lib/access/store.rb
access-2.1.4 lib/access/store.rb
access-2.1.3 lib/access/store.rb
access-2.1.2 lib/access/store.rb
access-2.1.1 lib/access/store.rb
access-2.1.0 lib/access/store.rb
access-2.0.55 lib/access/store.rb
access-2.0.54 lib/access/store.rb
access-2.0.53 lib/access/store.rb
access-2.0.52 lib/access/store.rb
access-2.0.51 lib/access/store.rb