Class: Nobel::Affiliation
- Inherits:
-
Object
- Object
- Nobel::Affiliation
- Defined in:
- lib/nobel/affiliation.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(data = nil) ⇒ Affiliation
constructor
A new instance of Affiliation.
Constructor Details
#initialize(data = nil) ⇒ Affiliation
Returns a new instance of Affiliation.
7 8 9 10 11 12 13 14 15 |
# File 'lib/nobel/affiliation.rb', line 7 def initialize(data = nil) data ||= {} data.tap do |d| @name = d['name'] @country = d['country'] @city = d['city'] end end |
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city.
5 6 7 |
# File 'lib/nobel/affiliation.rb', line 5 def city @city end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
5 6 7 |
# File 'lib/nobel/affiliation.rb', line 5 def country @country end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/nobel/affiliation.rb', line 5 def name @name end |