Class: String

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

Instance Method Summary collapse

Instance Method Details

#erb_eval(b) ⇒ Object



8
9
10
# File 'lib/another.rb', line 8

def erb_eval(b)
  ERB.new(self).result(b)
end

#sans(str) ⇒ Object



19
20
21
# File 'lib/another.rb', line 19

def sans(str)
  self.gsub(str, '')
end

#write(path) ⇒ Object



12
13
14
15
16
17
# File 'lib/another.rb', line 12

def write(path)
  puts "- #{path}"
  File.open(path, 'w') do |file|
    file << self
  end
end