Sha256: f21dfab65bc90796f3630f964f27ae4d5778010447595fb9bc6c9f8841a95c19

Contents?: true

Size: 1.02 KB

Versions: 4

Compression:

Stored size: 1.02 KB

Contents

require 'money_s3/parsers/base_parser'

module MoneyS3
  module Parsers
    class VlajkaType
      include BaseParser

      def id_user
        at 'IDUser'
      end

      def name_user
        at 'NameUser'
      end

      def id_flag
        at 'IDFlag'
      end

      def title
        at 'Title'
      end

      def enabled
        at 'Enabled'
      end

      def remark
        at 'Remark'
      end

      def rf_width
        at 'RFWidth'
      end

      def rf_height
        at 'RFHeight'
      end

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

        hash[:id_user] = id_user if has? 'IDUser'
        hash[:name_user] = name_user if has? 'NameUser'
        hash[:id_flag] = id_flag if has? 'IDFlag'
        hash[:title] = title if has? 'Title'
        hash[:enabled] = enabled if has? 'Enabled'
        hash[:remark] = remark if has? 'Remark'
        hash[:rf_width] = rf_width if has? 'RFWidth'
        hash[:rf_height] = rf_height if has? 'RFHeight'

        hash
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
money_s3-0.10.0 lib/money_s3/parsers/vlajka_type.rb
money_s3-0.9.0 lib/money_s3/parsers/vlajka_type.rb
money_s3-0.8.0 lib/money_s3/parsers/vlajka_type.rb
money_s3-0.7.0 lib/money_s3/parsers/vlajka_type.rb