Class: MLB::IdDescriptionType Abstract Private
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- MLB::IdDescriptionType
- Defined in:
- lib/mlb/id_description_type.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
This class is abstract.
Subclass and define specific domain semantics
Base class for simple id/description value objects from the MLB Stats API. Similar to CodeDescriptionType but uses ‘id’ as the identifier field.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ String
Returns the human-readable description.
-
#id ⇒ String
Returns the type identifier.
Instance Method Summary collapse
-
#to_s ⇒ String
Returns a string representation of the object.
Instance Attribute Details
#description ⇒ String
Returns the human-readable description
27 |
# File 'lib/mlb/id_description_type.rb', line 27 attribute :description, Shale::Type::String |
#id ⇒ String
Returns the type identifier
19 |
# File 'lib/mlb/id_description_type.rb', line 19 attribute :id, Shale::Type::String |
Instance Method Details
#to_s ⇒ String
Returns a string representation of the object
40 41 42 |
# File 'lib/mlb/id_description_type.rb', line 40 def to_s "#{id} (#{description})" end |