Class: Fbtxt::Model::Referee
- Inherits:
-
Object
- Object
- Fbtxt::Model::Referee
- Defined in:
- lib/fbtxt/document/models/referee.rb
Overview
rename to/use Official - why? why not?
Instance Attribute Summary collapse
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(name:, country: nil) ⇒ Referee
constructor
A new instance of Referee.
Constructor Details
#initialize(name:, country: nil) ⇒ Referee
Returns a new instance of Referee.
9 10 11 12 |
# File 'lib/fbtxt/document/models/referee.rb', line 9 def initialize( name:, country: nil ) @name = name @country = country end |
Instance Attribute Details
#country ⇒ Object (readonly)
Returns the value of attribute country.
7 8 9 |
# File 'lib/fbtxt/document/models/referee.rb', line 7 def country @country end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/fbtxt/document/models/referee.rb', line 7 def name @name end |
Instance Method Details
#as_json ⇒ Object
14 15 16 17 18 19 |
# File 'lib/fbtxt/document/models/referee.rb', line 14 def as_json(*) h = { 'name' => name } h['country'] = country if country h end |