Method: Pathname#append_text
- Defined in:
- lib/pleasant_path/pathname.rb
#append_text(text) ⇒ self
Appends text
to the file indicated by the Pathname. Creates the file if it does not exist, including any necessary parent directories. Returns the Pathname.
966 967 968 969 |
# File 'lib/pleasant_path/pathname.rb', line 966 def append_text(text) self.make_dirname.open("a"){|f| f.write(text) } self end |