Class: Official
- Inherits:
-
Object
- Object
- Official
- Defined in:
- lib/fbtxt-pp/models/officials.rb
Instance Attribute Summary collapse
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, country: nil, type: nil) ⇒ Official
constructor
A new instance of Official.
Constructor Details
#initialize(name:, country: nil, type: nil) ⇒ Official
Returns a new instance of Official.
19 20 21 22 23 24 25 |
# File 'lib/fbtxt-pp/models/officials.rb', line 19 def initialize( name:, country: nil, type: nil ) @name = name @country = country @type = type end |
Instance Attribute Details
#country ⇒ Object (readonly)
Returns the value of attribute country.
16 17 18 |
# File 'lib/fbtxt-pp/models/officials.rb', line 16 def country @country end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
16 17 18 |
# File 'lib/fbtxt-pp/models/officials.rb', line 16 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
16 17 18 |
# File 'lib/fbtxt-pp/models/officials.rb', line 16 def type @type end |
Class Method Details
.build(h) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/fbtxt-pp/models/officials.rb', line 8 def self.build( h ) new( name: h['name'], country: h['country'], type: h['type'] ) end |