Sha256: b741739c9242ebc653d9b8f15a43c8b4d9f413a5b0f44be872a7600dbd442f8d

Contents?: true

Size: 727 Bytes

Versions: 2

Compression:

Stored size: 727 Bytes

Contents

module Shoppr
  class Store
    include ROXML
    xml_convention {|val| val.camelize(:lower) }
    xml_reader :id, :from => '@id', :as => Integer
    xml_reader :name
    xml_reader :logo, :as => Image
    xml_reader :phone_number
    xml_reader :trusted?, :from => :attr
    xml_reader :authorized_reseller?, :from => :attr
    xml_reader :country_flag, :as => Image
    xml_reader :country_code, :from => 'countryFlag/countryCode'
    xml_reader :review_count, :as => Integer, :from => 'ratingInfo/reviewCount'
    xml_reader :rating, :as => Float, :from => 'ratingInfo/rating'
    xml_reader :rating_image, :as => Image, :from => 'ratingInfo/ratingImage'
    xml_reader :review_url, :from => 'ratingInfo/reviewURL'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shoppr-0.1.1 lib/shoppr/store.rb
shoppr-0.1.0 lib/shoppr/store.rb