Class: Enumerator

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

Overview

Provides to_s

Instance Method Summary collapse

Instance Method Details

#to_sString

Converts Enumerator to a string representing Integer.times

Returns:

  • (String)

    the Enumerator as a string



40
41
42
# File 'lib/ruby_grammar_builder/util.rb', line 40

def to_s
    size.to_s + ".times"
end