Class: Crapshoot::Result

Inherits:
Integer
  • Object
show all
Defined in:
lib/crapshoot/result.rb

Overview

An Integer with a description, uses DelegateClass from the stdlib to do this

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Result

Creates a new result with the given value.

Everything except the description is delegated to this value.



7
8
9
# File 'lib/crapshoot/result.rb', line 7

def initialize(value)
  super value
end

Instance Attribute Details

#descriptionObject

The derivation of the result, as a String.



12
13
14
# File 'lib/crapshoot/result.rb', line 12

def description
  @description
end

#detailed_descriptionObject

The derivation of the result, broken down by tokens, as an Array.



15
16
17
# File 'lib/crapshoot/result.rb', line 15

def detailed_description
  @detailed_description
end