Class: LittleGhost::StructuredResult

Inherits:
Data
  • Object
show all
Defined in:
lib/little_ghost/run_result.rb,
lib/little_ghost/run_result.rb

Overview

Associates a validated structured value with its declared schema name.

result = LittleGhost::StructuredResult.new(
schema_name: "support_research",
value: {"summary" => "The transfer is still settling."}
)
result.value.fetch("summary") # => "The transfer is still settling."

Instance Attribute Summary collapse

Instance Attribute Details

#schema_nameObject (readonly)

Returns the value of attribute schema_name

Returns:

  • (Object)

    the current value of schema_name



5
6
7
# File 'lib/little_ghost/run_result.rb', line 5

def schema_name
  @schema_name
end

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



5
6
7
# File 'lib/little_ghost/run_result.rb', line 5

def value
  @value
end