Class: Logic::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/logick.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(atts) ⇒ Result

Returns a new instance of Result.



11
12
13
14
15
# File 'lib/logick.rb', line 11

def initialize(atts)
  @type   = atts[:type]
  @output = atts[:output]
  @errors = atts[:errors]
end

Instance Attribute Details

#errorsObject

Returns the value of attribute errors.



9
10
11
# File 'lib/logick.rb', line 9

def errors
  @errors
end

#outputObject

Returns the value of attribute output.



9
10
11
# File 'lib/logick.rb', line 9

def output
  @output
end

#typeObject

Returns the value of attribute type.



9
10
11
# File 'lib/logick.rb', line 9

def type
  @type
end

Instance Method Details

#fail?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/logick.rb', line 21

def fail?
  @type == :fail
end

#success?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/logick.rb', line 17

def success?
  @type == :success
end