Sha256: e728b59cf272b583b189776e0a74ac9406f15bb028dd1cbee25e5420d3f33aed

Contents?: true

Size: 1019 Bytes

Versions: 7

Compression:

Stored size: 1019 Bytes

Contents

module MoneyS3
  module Parsers
    class MzdoveObdobiType
      include ParserCore::BaseParser

      def mesic
        at 'Mesic'
      end

      def mesic_attributes
        attributes_at 'Mesic'
      end

      def rok
        at 'Rok'
      end

      def rok_attributes
        attributes_at 'Rok'
      end

      def funkce
        at 'Funkce'
      end

      def funkce_attributes
        attributes_at 'Funkce'
      end

      def prac_pomer
        submodel_at(PracPomer, 'PracPomer')
      end

      def to_h
        hash = {}
        hash[:attributes] = attributes

        hash[:mesic] = mesic if has? 'Mesic'
        hash[:mesic_attributes] = mesic_attributes if has? 'Mesic'
        hash[:rok] = rok if has? 'Rok'
        hash[:rok_attributes] = rok_attributes if has? 'Rok'
        hash[:funkce] = funkce if has? 'Funkce'
        hash[:funkce_attributes] = funkce_attributes if has? 'Funkce'
        hash[:prac_pomer] = prac_pomer.to_h if has? 'PracPomer'

        hash
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
money_s3-2.4.1 lib/money_s3/parsers/mzdove_obdobi_type.rb
money_s3-2.4.0 lib/money_s3/parsers/mzdove_obdobi_type.rb
money_s3-2.3.0 lib/money_s3/parsers/mzdove_obdobi_type.rb
money_s3-2.2.0 lib/money_s3/parsers/mzdove_obdobi_type.rb
money_s3-2.1.0 lib/money_s3/parsers/mzdove_obdobi_type.rb
money_s3-2.0.0 lib/money_s3/parsers/mzdove_obdobi_type.rb
money_s3-1.0.0 lib/money_s3/parsers/mzdove_obdobi_type.rb