Class: Nobel::Affiliation

Inherits:
Object
  • Object
show all
Defined in:
lib/nobel/affiliation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#cityObject (readonly)

Returns the value of attribute city.



5
6
7
# File 'lib/nobel/affiliation.rb', line 5

def city
  @city
end

#countryObject (readonly)

Returns the value of attribute country.



5
6
7
# File 'lib/nobel/affiliation.rb', line 5

def country
  @country
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/nobel/affiliation.rb', line 5

def name
  @name
end