Class: PlanMyStuff::BaseProjectMetadata
- Inherits:
-
BaseMetadata
- Object
- BaseMetadata
- PlanMyStuff::BaseProjectMetadata
- Defined in:
- lib/plan_my_stuff/base_project_metadata.rb
Overview
Shared base for project-style metadata (regular and testing). Holds the kind dispatch field and serialization hook. Not instantiated directly; use ProjectMetadata or TestingProjectMetadata.
Direct Known Subclasses
Constant Summary
Constants inherited from BaseMetadata
PlanMyStuff::BaseMetadata::SCHEMA_VERSION
Instance Attribute Summary collapse
-
#kind ⇒ String?
Dispatch key: “project” or “testing”.
Attributes inherited from BaseMetadata
#app_name, #created_by, #custom_fields, #gem_version, #rails_env, #schema_version, #visibility
Instance Method Summary collapse
Methods inherited from BaseMetadata
#initialize, #internal?, #public?, #to_json, #validate_custom_fields!
Constructor Details
This class inherits a constructor from PlanMyStuff::BaseMetadata
Instance Attribute Details
#kind ⇒ String?
Returns dispatch key: “project” or “testing”.
9 10 11 |
# File 'lib/plan_my_stuff/base_project_metadata.rb', line 9 def kind @kind end |
Instance Method Details
#to_h ⇒ Hash
12 13 14 |
# File 'lib/plan_my_stuff/base_project_metadata.rb', line 12 def to_h super.merge(kind: kind) end |