Class: Checkoff::Internal::ProjectHashes
- Inherits:
-
Object
- Object
- Checkoff::Internal::ProjectHashes
- Defined in:
- lib/checkoff/internal/project_hashes.rb
Overview
Builds on the standard API representation of an Asana project with some convenience keys.
Instance Method Summary collapse
-
#initialize(_deps = {}) ⇒ ProjectHashes
constructor
A new instance of ProjectHashes.
- #project_to_h(project_obj, project: :not_specified) ⇒ Hash
Constructor Details
#initialize(_deps = {}) ⇒ ProjectHashes
Returns a new instance of ProjectHashes.
9 |
# File 'lib/checkoff/internal/project_hashes.rb', line 9 def initialize(_deps = {}); end |
Instance Method Details
#project_to_h(project_obj, project: :not_specified) ⇒ Hash
15 16 17 18 19 20 21 |
# File 'lib/checkoff/internal/project_hashes.rb', line 15 def project_to_h(project_obj, project: :not_specified) project = project_obj.name if project == :not_specified project_hash = { **project_obj.to_h, 'project' => project } project_hash['unwrapped'] = {} unwrap_custom_fields(project_hash) project_hash end |