Module: RollString

Included in:
DiceBag::Roll
Defined in:
lib/dicebag/roll_string.rb

Overview

This encapsulates the Roll class’ string generation methods.

Instance Method Summary collapse

Instance Method Details

#to_s(no_spaces = false) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/dicebag/roll_string.rb', line 6

def to_s(no_spaces = false)
  @string = ''
  @space  = no_spaces ? '' : ' '

  to_s_tree

  @string.strip
end