Sha256: 3bfa35287652d4af88d81664ec951dc4a6d37c9a6f9e16cb939b8a94a62b9dc0

Contents?: true

Size: 488 Bytes

Versions: 13

Compression:

Stored size: 488 Bytes

Contents

module SparkApi
  module Models
    class FloPlan < Base
      extend Subresource
      self.element_name = 'floplans'

      attr_accessor :images, :thumbnails

      def initialize(attributes={})
        @images = []
        @thumbnails = []

        attributes['Images'].each do |img|
          if img["Type"].include?('thumbnail')
            @thumbnails << img
          else
            @images << img
          end
        end
        super(attributes)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
spark_api-1.6.3 lib/spark_api/models/floplan.rb
spark_api-1.6.2 lib/spark_api/models/floplan.rb
spark_api-1.6.1 lib/spark_api/models/floplan.rb
spark_api-1.5.7 lib/spark_api/models/floplan.rb
spark_api-1.6.0 lib/spark_api/models/floplan.rb
spark_api-1.5.6 lib/spark_api/models/floplan.rb
spark_api-1.5.5 lib/spark_api/models/floplan.rb
spark_api-1.5.4 lib/spark_api/models/floplan.rb
spark_api-1.5.3 lib/spark_api/models/floplan.rb
spark_api-1.5.2 lib/spark_api/models/floplan.rb
spark_api-1.5.1 lib/spark_api/models/floplan.rb
spark_api-1.5.0 lib/spark_api/models/floplan.rb
spark_api-1.4.34 lib/spark_api/models/floplan.rb