Class: Range

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

Overview

Enchancement of Range class to join range elements into string.

Instance Method Summary collapse

Instance Method Details

#to_charsString

Joins range elements into string.

Returns:

  • (String)

    string representation of the range



144
145
146
# File 'lib/dsl/monkeypatches.rb', line 144

def to_chars
  self.to_a.join
end