Sha256: 7b6bb3e7f4df2909fc3814affe395db1777a952e17409bf28d355524802a74ef

Contents?: true

Size: 438 Bytes

Versions: 11

Compression:

Stored size: 438 Bytes

Contents

module Cv
  class Param
    attr_accessor :cv_ref, :accession, :name, :value

    def initialize(cv_ref, accession, name, value=nil)
      (@cv_ref, @accession, @name, @value) = [cv_ref, accession, name, value]
    end

    def to_xml(xml, name=:cvParam)
      hash_to_send = {:cvRef => @cvref, :accession => @accession, :name => @name}
      hash_to_send[:value] = @value if @value
      xml.send(name, hash_to_send)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ms-core-0.0.19 lib/cv/param.rb
ms-core-0.0.18 lib/cv/param.rb
ms-core-0.0.17 lib/cv/param.rb
ms-core-0.0.16 lib/cv/param.rb
ms-core-0.0.14 lib/cv/param.rb
ms-core-0.0.13 lib/cv/param.rb
ms-core-0.0.12 lib/cv/param.rb
ms-core-0.0.11 lib/cv/param.rb
ms-core-0.0.10 lib/cv/param.rb
ms-core-0.0.9 lib/cv/param.rb
ms-core-0.0.7 lib/cv/param.rb