Sha256: f80c644372996a8d932dc364f5311a887702788c3cc50cf0379a4df89126eb93

Contents?: true

Size: 373 Bytes

Versions: 1

Compression:

Stored size: 373 Bytes

Contents

require 'money_s3/base_element'
require 'money_s3/vlajka_type'

module MoneyS3
  class Vlajky
    include BaseElement

    def global
      submodel_at(VlajkaType, :Global)
    end

    def user
      submodel_at(VlajkaType, :User)
    end

    def to_h
      { global: global.to_h,
        user: user.to_h
      }.delete_if { |k, v| v.nil? || v.empty? }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
money_s3-0.3.0 lib/money_s3/vlajky.rb