Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/mindapp/helpers.rb

Instance Method Summary collapse

Instance Method Details

#comment?Boolean

Returns:

  • (Boolean)


386
387
388
# File 'lib/mindapp/helpers.rb', line 386

def comment?
  self[0]=='#'
end

#to_codeObject



389
390
391
392
393
394
395
396
# File 'lib/mindapp/helpers.rb', line 389

def to_code
  s= self.dup
#    s.downcase!
#    s.gsub! /[\s\-_]/, ""
#    s
  code, name = s.split(':')
  code.downcase.strip.gsub(' ','_').gsub(/[^#_\/a-zA-Z0-9]/,'')
end