Class: Cv::Param
- Inherits:
-
Object
- Object
- Cv::Param
- Defined in:
- lib/cv/param.rb
Instance Attribute Summary collapse
-
#accession ⇒ Object
Returns the value of attribute accession.
-
#cv_ref ⇒ Object
Returns the value of attribute cv_ref.
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(cv_ref, accession, name, value = nil) ⇒ Param
constructor
A new instance of Param.
- #to_xml(xml, name = :cvParam) ⇒ Object
Constructor Details
#initialize(cv_ref, accession, name, value = nil) ⇒ Param
Returns a new instance of Param.
6 7 8 |
# File 'lib/cv/param.rb', line 6 def initialize(cv_ref, accession, name, value=nil) (@cv_ref, @accession, @name, @value) = [cv_ref, accession, name, value] end |
Instance Attribute Details
#accession ⇒ Object
Returns the value of attribute accession.
4 5 6 |
# File 'lib/cv/param.rb', line 4 def accession @accession end |
#cv_ref ⇒ Object
Returns the value of attribute cv_ref.
4 5 6 |
# File 'lib/cv/param.rb', line 4 def cv_ref @cv_ref end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/cv/param.rb', line 4 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/cv/param.rb', line 4 def value @value end |
Instance Method Details
#to_xml(xml, name = :cvParam) ⇒ Object
10 11 12 13 14 |
# File 'lib/cv/param.rb', line 10 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 |