Module: NHKore::Fileable
- Included in:
- News, SearchLinks, Sifter
- Defined in:
- lib/nhkore/fileable.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(mod) ⇒ Object
13 14 15 |
# File 'lib/nhkore/fileable.rb', line 13 def self.included(mod) mod.extend ClassMethods end |
Instance Method Details
#save_file(file, mode: 'wt', **kargs) ⇒ Object
17 18 19 20 21 |
# File 'lib/nhkore/fileable.rb', line 17 def save_file(file,mode: 'wt',**kargs) File.open(file,mode: mode,**kargs) do |f| f.write(to_s) end end |