Sha256: 2111ce169feb9671bd576b179ca7cac1a8cc0c4167f35c1f56a81ab53d53b226

Contents?: true

Size: 527 Bytes

Versions: 7

Compression:

Stored size: 527 Bytes

Contents

require "shale"

require_relative "imgarea"

module Stepmod
  module Utils
    module Parsers
      module Models
        class Img < Shale::Mapper
          attribute :src, Shale::Type::String
          attribute :alt, Shale::Type::String
          attribute :img_area, Imgarea, collection: true

          xml do
            root "img"

            map_attribute "src", to: :src
            map_attribute "alt", to: :alt
            map_element "img.area", to: :img_area
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
stepmod-utils-0.6.6 lib/stepmod/utils/parsers/models/img.rb
stepmod-utils-0.6.5 lib/stepmod/utils/parsers/models/img.rb
stepmod-utils-0.6.3 lib/stepmod/utils/parsers/models/img.rb
stepmod-utils-0.6.2 lib/stepmod/utils/parsers/models/img.rb
stepmod-utils-0.6.1 lib/stepmod/utils/parsers/models/img.rb
stepmod-utils-0.6.0 lib/stepmod/utils/parsers/models/img.rb
stepmod-utils-0.5.0 lib/stepmod/utils/parsers/models/img.rb