Sha256: 7f51c1aa4b0dbdf9cd671acf4a7294d3caec9ffb073ff73453e797143b079324

Contents?: true

Size: 521 Bytes

Versions: 11

Compression:

Stored size: 521 Bytes

Contents

require 'ms/cv/paramable'
require 'ms/mzml/list'

module MS
  class Mzml
    class Sample
      include MS::CV::Paramable

      attr_accessor :id, :name

      def initialize(id, name, opts={params: []}, &block)
        @id, @name = id, name
        describe!(*opts[:params])
        block.call(self) if block
      end

      def to_xml(builder)
        builder.sample( id: @id, name: @name ) do |sample_n|
          super(sample_n)
        end
        builder
      end

      extend(MS::Mzml::List)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mspire-0.6.26 lib/ms/mzml/sample.rb
mspire-0.6.25 lib/ms/mzml/sample.rb
mspire-0.6.24 lib/ms/mzml/sample.rb
mspire-0.6.22 lib/ms/mzml/sample.rb
mspire-0.6.21 lib/ms/mzml/sample.rb
mspire-0.6.20 lib/ms/mzml/sample.rb
mspire-0.6.19 lib/ms/mzml/sample.rb
mspire-0.6.18 lib/ms/mzml/sample.rb
mspire-0.6.12 lib/ms/mzml/sample.rb
mspire-0.6.11 lib/ms/mzml/sample.rb
mspire-0.6.9 lib/ms/mzml/sample.rb