Class: Hecks::Forms::Record

Inherits:
Struct
  • Object
show all
Defined in:
lib/hecks/forms/record_table.rb

Overview

The one shape every renderer in this directory reads a record as — id plus its state hash. Runtime::Instance already answers both, so repository.all's own records pass straight through; a QUERY's answer does not (QueryInterpreter#call flattens {id:}.merge(state) into one hash with no method to call — see docs/command-form-and-query-form-bluebook.md's note on why), so app.rb wraps those results in one of these before they ever reach a renderer, and every renderer here only has to know one shape.

Instance Attribute Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



14
15
16
# File 'lib/hecks/forms/record_table.rb', line 14

def id
  @id
end

#stateObject

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



14
15
16
# File 'lib/hecks/forms/record_table.rb', line 14

def state
  @state
end