Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/jinda/helpers.rb
Instance Method Summary collapse
-
#comment? ⇒ Boolean
Put comment in freemind with # Sample Freemind #ctrs:ctrs&Menu.
- #to_code ⇒ Object
Instance Method Details
#comment? ⇒ Boolean
Put comment in freemind with # Sample Freemind #ctrs:ctrs&Menu
732 733 734 |
# File 'lib/jinda/helpers.rb', line 732 def comment? self[0]=='#' end |
#to_code ⇒ Object
735 736 737 738 739 740 741 742 |
# File 'lib/jinda/helpers.rb', line 735 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 |