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
14 15 16 |
# File 'lib/nhkore/fileable.rb', line 14 def self.included(mod) mod.extend ClassMethods end |
Instance Method Details
#save_file(file, mode: 'wt', **kargs) ⇒ Object
18 19 20 21 22 |
# File 'lib/nhkore/fileable.rb', line 18 def save_file(file,mode: 'wt',**kargs) File.open(file,mode: mode,**kargs) do |f| f.write(to_s) end end |