Class: PlanMyStuff::BaseProjectMetadata

Inherits:
BaseMetadata show all
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

ProjectMetadata, TestingProjectMetadata

Constant Summary

Constants inherited from BaseMetadata

PlanMyStuff::BaseMetadata::SCHEMA_VERSION

Instance Attribute Summary collapse

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

#kindString?

Returns dispatch key: “project” or “testing”.

Returns:

  • (String, nil)

    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_hHash

Returns:

  • (Hash)


12
13
14
# File 'lib/plan_my_stuff/base_project_metadata.rb', line 12

def to_h
  super.merge(kind: kind)
end