Class: Bgem::TargetFile

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

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ TargetFile

Returns a new instance of TargetFile.



3
4
5
# File 'lib/bgem/target_file.rb', line 3

def initialize path
  @path = Pathname path
end

Instance Method Details

#write(string) ⇒ Object



7
8
9
10
# File 'lib/bgem/target_file.rb', line 7

def write string
  @path.dirname.mkpath
  @path.write string
end