Class: PoliPage::ProjectModeInput
- Inherits:
-
Data
- Object
- Data
- PoliPage::ProjectModeInput
- Defined in:
- lib/poli_page/inputs/project_mode_input.rb
Overview
Convenience value-object form of the project-mode render input. Methods accept bare kwargs directly; this wrapper is for callers who want ‘Data.define`’s equality, frozen-by-default semantics, and a single marshallable type to thread through their own code.
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#idempotency_key ⇒ Object
readonly
Returns the value of attribute idempotency_key.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#orientation ⇒ Object
readonly
Returns the value of attribute orientation.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
-
#template ⇒ Object
readonly
Returns the value of attribute template.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
- ._strict_new ⇒ Object
- .new(project:, template:, data:, version: nil, format: nil, orientation: nil, locale: nil, metadata: nil, idempotency_key: nil) ⇒ Object
Instance Method Summary collapse
-
#to_h ⇒ Hash
Kwargs ready to splat into the matching ‘client.render.*` method.
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data
8 9 10 |
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8 def data @data end |
#format ⇒ Object (readonly)
Returns the value of attribute format
8 9 10 |
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8 def format @format end |
#idempotency_key ⇒ Object (readonly)
Returns the value of attribute idempotency_key
8 9 10 |
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8 def idempotency_key @idempotency_key end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale
8 9 10 |
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8 def locale @locale end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata
8 9 10 |
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8 def @metadata end |
#orientation ⇒ Object (readonly)
Returns the value of attribute orientation
8 9 10 |
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8 def orientation @orientation end |
#project ⇒ Object (readonly)
Returns the value of attribute project
8 9 10 |
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8 def project @project end |
#template ⇒ Object (readonly)
Returns the value of attribute template
8 9 10 |
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8 def template @template end |
#version ⇒ Object (readonly)
Returns the value of attribute version
8 9 10 |
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8 def version @version end |
Class Method Details
._strict_new ⇒ Object
29 |
# File 'lib/poli_page/inputs/project_mode_input.rb', line 29 alias _strict_new new |
.new(project:, template:, data:, version: nil, format: nil, orientation: nil, locale: nil, metadata: nil, idempotency_key: nil) ⇒ Object
31 32 33 34 35 36 |
# File 'lib/poli_page/inputs/project_mode_input.rb', line 31 def new(project:, template:, data:, version: nil, format: nil, orientation: nil, locale: nil, metadata: nil, idempotency_key: nil) _strict_new(project: project, template: template, data: data, version: version, format: format, orientation: orientation, locale: locale, metadata: , idempotency_key: idempotency_key) end |
Instance Method Details
#to_h ⇒ Hash
Returns kwargs ready to splat into the matching ‘client.render.*` method.
20 21 22 |
# File 'lib/poli_page/inputs/project_mode_input.rb', line 20 def to_h super.compact end |