Class: Clickwrap::Presenter::Result

Inherits:
Data
  • Object
show all
Defined in:
lib/clickwrap/presenter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actorObject (readonly)

Returns the value of attribute actor

Returns:

  • (Object)

    the current value of actor



92
93
94
# File 'lib/clickwrap/presenter.rb', line 92

def actor
  @actor
end

#combinedObject (readonly)

Returns the value of attribute combined

Returns:

  • (Object)

    the current value of combined



92
93
94
# File 'lib/clickwrap/presenter.rb', line 92

def combined
  @combined
end

#localeObject (readonly)

Returns the value of attribute locale

Returns:

  • (Object)

    the current value of locale



92
93
94
# File 'lib/clickwrap/presenter.rb', line 92

def locale
  @locale
end

#manifestObject (readonly)

Returns the value of attribute manifest

Returns:

  • (Object)

    the current value of manifest



92
93
94
# File 'lib/clickwrap/presenter.rb', line 92

def manifest
  @manifest
end

#policyObject (readonly)

Returns the value of attribute policy

Returns:

  • (Object)

    the current value of policy



92
93
94
# File 'lib/clickwrap/presenter.rb', line 92

def policy
  @policy
end

#represented_partyObject (readonly)

Returns the value of attribute represented_party

Returns:

  • (Object)

    the current value of represented_party



92
93
94
# File 'lib/clickwrap/presenter.rb', line 92

def represented_party
  @represented_party
end

#statementsObject (readonly)

Returns the value of attribute statements

Returns:

  • (Object)

    the current value of statements



92
93
94
# File 'lib/clickwrap/presenter.rb', line 92

def statements
  @statements
end

#subjectObject (readonly)

Returns the value of attribute subject

Returns:

  • (Object)

    the current value of subject



92
93
94
# File 'lib/clickwrap/presenter.rb', line 92

def subject
  @subject
end

#submit_button_textObject (readonly)

Returns the value of attribute submit_button_text

Returns:

  • (Object)

    the current value of submit_button_text



92
93
94
# File 'lib/clickwrap/presenter.rb', line 92

def submit_button_text
  @submit_button_text
end

#tenant_keyObject (readonly)

Returns the value of attribute tenant_key

Returns:

  • (Object)

    the current value of tenant_key



92
93
94
# File 'lib/clickwrap/presenter.rb', line 92

def tenant_key
  @tenant_key
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



92
93
94
# File 'lib/clickwrap/presenter.rb', line 92

def token
  @token
end

Instance Method Details

#as_jsonObject



99
# File 'lib/clickwrap/presenter.rb', line 99

def as_json(*) = manifest.to_h

#combined?Boolean

Returns:

  • (Boolean)


95
# File 'lib/clickwrap/presenter.rb', line 95

def combined? = !combined.nil?

#itemized_statementsObject

The statements this presentation renders as controls of their own: everything the composed line could not honestly absorb.



103
104
105
106
107
# File 'lib/clickwrap/presenter.rb', line 103

def itemized_statements
  return statements if combined.nil?

  statements.reject { |statement| combined.covers?(statement.key) }
end

#policy_keyObject



96
# File 'lib/clickwrap/presenter.rb', line 96

def policy_key = policy.key

#revisionObject



97
# File 'lib/clickwrap/presenter.rb', line 97

def revision = manifest.revision_digest

#statement(key) ⇒ Object



94
# File 'lib/clickwrap/presenter.rb', line 94

def statement(key) = statements.find { |candidate| candidate.key == key.to_s }

#to_hObject



98
# File 'lib/clickwrap/presenter.rb', line 98

def to_h = manifest.to_h