Class: TimestampAPI::Model
- Inherits:
-
Object
- Object
- TimestampAPI::Model
- Includes:
- Hooks, ModelAttributes, ModelDefaultAPIMethods, ModelRelations, Utils
- Defined in:
- lib/timestamp_api/model.rb
Instance Attribute Summary collapse
-
#json_data ⇒ Object
readonly
Returns the value of attribute json_data.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(json_data) ⇒ Model
constructor
A new instance of Model.
Methods included from ModelDefaultAPIMethods
Methods included from ModelRelations
Methods included from ModelAttributes
Methods included from Utils
Constructor Details
#initialize(json_data) ⇒ Model
Returns a new instance of Model.
18 19 20 21 22 |
# File 'lib/timestamp_api/model.rb', line 18 def initialize(json_data) @json_data = json_data validate_init_data! run_hook :after_initialize end |
Instance Attribute Details
#json_data ⇒ Object (readonly)
Returns the value of attribute json_data.
3 4 5 |
# File 'lib/timestamp_api/model.rb', line 3 def json_data @json_data end |
Class Method Details
.inherited(subclass) ⇒ Object
13 14 15 16 |
# File 'lib/timestamp_api/model.rb', line 13 def self.inherited(subclass) ModelRegistry.register(subclass) run_hook :after_inherited, subclass end |