Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/core_ext/string.rb
Instance Method Summary collapse
Instance Method Details
#erb_eval(b) ⇒ Object
4 5 6 |
# File 'lib/core_ext/string.rb', line 4 def erb_eval(b) ERB.new(self).result(b) end |
#sans(str) ⇒ Object
15 16 17 |
# File 'lib/core_ext/string.rb', line 15 def sans(str) gsub(str, '') end |
#write(path) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/core_ext/string.rb', line 8 def write(path) puts "- #{path}" File.open(path, 'w') do |file| file << self end end |