Sha256: 4cb29dd7b11067782d75dc889a6901fe7238c695d88d77438828a4bbd006729d

Contents?: true

Size: 479 Bytes

Versions: 2

Compression:

Stored size: 479 Bytes

Contents

module MoneyS3
  module Parsers
    class Vlajky
      include ParserCore::BaseParser

      def global
        submodel_at(VlajkaType, 'Global')
      end

      def user
        submodel_at(VlajkaType, 'User')
      end

      def to_h_with_attrs
        hash = ParserCore::HashWithAttributes.new({}, attributes)

        hash[:global] = global.to_h_with_attrs if has? 'Global'
        hash[:user] = user.to_h_with_attrs if has? 'User'

        hash
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
money_s3-0.12.0 lib/money_s3/parsers/vlajky.rb
money_s3-0.11.0 lib/money_s3/parsers/vlajky.rb