Class: String

Inherits:
Object show all
Defined in:
lib/casegen.rb,
lib/agents/sets.rb

Instance Method Summary collapse

Instance Method Details

#outdentObject



4
5
6
7
# File 'lib/casegen.rb', line 4

def outdent
  a = $1 if match(/\A(\s*)(.*\n)(?:\1.*\n|\n)*\z/)
  gsub(/^#{a}/, '')
end

#to_uObject



7
8
9
# File 'lib/agents/sets.rb', line 7

def to_u
  self.gsub(/ /, '_')
end