Class: PDCMetadata::Funder
- Inherits:
-
Object
- Object
- PDCMetadata::Funder
- Defined in:
- app/models/pdc_metadata/funder.rb
Instance Attribute Summary collapse
-
#award_number ⇒ Object
Returns the value of attribute award_number.
-
#award_uri ⇒ Object
Returns the value of attribute award_uri.
-
#funder_name ⇒ Object
Returns the value of attribute funder_name.
-
#ror ⇒ Object
Returns the value of attribute ror.
Class Method Summary collapse
Instance Method Summary collapse
- #compare_value ⇒ Object
-
#initialize(ror, funder_name, award_number, award_uri) ⇒ Funder
constructor
A new instance of Funder.
Constructor Details
#initialize(ror, funder_name, award_number, award_uri) ⇒ Funder
Returns a new instance of Funder.
17 18 19 20 21 22 |
# File 'app/models/pdc_metadata/funder.rb', line 17 def initialize(ror, funder_name, award_number, award_uri) @ror = ror @funder_name = funder_name @award_number = award_number @award_uri = award_uri end |
Instance Attribute Details
#award_number ⇒ Object
Returns the value of attribute award_number.
5 6 7 |
# File 'app/models/pdc_metadata/funder.rb', line 5 def award_number @award_number end |
#award_uri ⇒ Object
Returns the value of attribute award_uri.
5 6 7 |
# File 'app/models/pdc_metadata/funder.rb', line 5 def award_uri @award_uri end |
#funder_name ⇒ Object
Returns the value of attribute funder_name.
5 6 7 |
# File 'app/models/pdc_metadata/funder.rb', line 5 def funder_name @funder_name end |
#ror ⇒ Object
Returns the value of attribute ror.
5 6 7 |
# File 'app/models/pdc_metadata/funder.rb', line 5 def ror @ror end |
Class Method Details
.funder_from_hash(funder) ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/models/pdc_metadata/funder.rb', line 8 def funder_from_hash(funder) ror = funder["ror"] funder_name = funder["funder_name"] award_number = funder["award_number"] award_uri = funder["award_uri"] PDCMetadata::Funder.new(ror, funder_name, award_number, award_uri) end |
Instance Method Details
#compare_value ⇒ Object
24 25 26 |
# File 'app/models/pdc_metadata/funder.rb', line 24 def compare_value "ROR: #{ror}\nFunder Name: #{funder_name}\nAward Number: #{award_number}\nAward URI: #{award_uri}" end |