Class: Kernai::Plan::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/kernai/plan.rb

Overview

Small value object returned by Plan.validate. ‘plan` is set only on success; `reason` is set only on failure.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#planObject

Returns the value of attribute plan

Returns:

  • (Object)

    the current value of plan



29
30
31
# File 'lib/kernai/plan.rb', line 29

def plan
  @plan
end

#reasonObject

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



29
30
31
# File 'lib/kernai/plan.rb', line 29

def reason
  @reason
end

Instance Method Details

#ok?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/kernai/plan.rb', line 30

def ok?
  !plan.nil?
end