Class: PlanMyStuff::BaseProjectMetadata

Inherits:
BaseMetadata
  • Object
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

Instance Attribute Summary collapse

Instance Method Summary collapse

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