Sha256: 38eab95690b280553a566c4a742deb26be58afac549e4de93c32c62811208413

Contents?: true

Size: 559 Bytes

Versions: 12

Compression:

Stored size: 559 Bytes

Contents

# frozen_string_literal: true

module CXML
  # accounting details in item outs
  class Accounting < DocumentNode
    accessible_attributes %i[
      name
    ]
    accessible_nodes %i[
      segments
    ]

    def initialize_segments(value)
      value = [value] unless value.is_a?(Array)
      @segments = value.map do |item|
        CXML::Segment.new(item)
      end
    end

    def initialize_segment(value)
      value = [value] unless value.is_a?(Array)
      @segments = value.map do |item|
        CXML::Segment.new(item)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cxml-ruby-0.8.2 lib/cxml/accounting.rb
cxml-ruby-0.8.1 lib/cxml/accounting.rb
cxml-ruby-0.8.0 lib/cxml/accounting.rb
cxml-ruby-0.7.0 lib/cxml/accounting.rb
cxml-ruby-0.6.1 lib/cxml/accounting.rb
cxml-ruby-0.6.0 lib/cxml/accounting.rb
cxml-ruby-0.5.0 lib/cxml/accounting.rb
cxml-ruby-0.4.1 lib/cxml/accounting.rb
cxml-ruby-0.4.0 lib/cxml/accounting.rb
cxml-ruby-0.3.0 lib/cxml/accounting.rb
cxml-ruby-0.2.1 lib/cxml/accounting.rb
cxml-ruby-0.2.0 lib/cxml/accounting.rb