Class: Retab::Category
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::Category
- Defined in:
- lib/retab/classifications/category.rb
Constant Summary collapse
- HASH_ATTRS =
{ name: :name, handle_key: :handle_key, description: :description }.freeze
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#handle_key ⇒ Object
Returns the value of attribute handle_key.
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ Category
constructor
A new instance of Category.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ Category
Returns a new instance of Category.
19 20 21 22 23 24 |
# File 'lib/retab/classifications/category.rb', line 19 def initialize(json) hash = self.class.normalize(json) @name = hash[:name] @handle_key = hash[:handle_key] @description = hash[:description] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
14 15 16 |
# File 'lib/retab/classifications/category.rb', line 14 def description @description end |
#handle_key ⇒ Object
Returns the value of attribute handle_key.
14 15 16 |
# File 'lib/retab/classifications/category.rb', line 14 def handle_key @handle_key end |
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/retab/classifications/category.rb', line 14 def name @name end |