Class: PoliPage::ProjectModeInput

Inherits:
Data
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



8
9
10
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8

def data
  @data
end

#formatObject (readonly)

Returns the value of attribute format

Returns:

  • (Object)

    the current value of format



8
9
10
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8

def format
  @format
end

#idempotency_keyObject (readonly)

Returns the value of attribute idempotency_key

Returns:

  • (Object)

    the current value of idempotency_key



8
9
10
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8

def idempotency_key
  @idempotency_key
end

#localeObject (readonly)

Returns the value of attribute locale

Returns:

  • (Object)

    the current value of locale



8
9
10
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8

def locale
  @locale
end

#metadataObject (readonly)

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



8
9
10
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8

def 
  @metadata
end

#orientationObject (readonly)

Returns the value of attribute orientation

Returns:

  • (Object)

    the current value of orientation



8
9
10
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8

def orientation
  @orientation
end

#projectObject (readonly)

Returns the value of attribute project

Returns:

  • (Object)

    the current value of project



8
9
10
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8

def project
  @project
end

#templateObject (readonly)

Returns the value of attribute template

Returns:

  • (Object)

    the current value of template



8
9
10
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8

def template
  @template
end

#versionObject (readonly)

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



8
9
10
# File 'lib/poli_page/inputs/project_mode_input.rb', line 8

def version
  @version
end

Class Method Details

._strict_newObject



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_hHash

Returns kwargs ready to splat into the matching ‘client.render.*` method.

Returns:

  • (Hash)

    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