Sha256: ee19cea6ee284d2880ad7682d2c97ddb38e94369be702c8bb936930a2734c664
Contents?: true
Size: 479 Bytes
Versions: 4
Compression:
Stored size: 479 Bytes
Contents
module Bunch class AbstractNode attr_accessor :options def content raise NotImplementedError end alias name content alias target_extension content def write_to_dir(dir) write_to_file(File.join(dir, name)) end def write_to_file(fn) out_file = "#{fn}#{target_extension}" File.open(out_file, 'w') { |f| f.write(content) } end protected def fetch(fn, &blk) Cache.fetch(fn, &blk) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
bunch-0.2.2 | lib/bunch/abstract_node.rb |
bunch-0.2.1 | lib/bunch/abstract_node.rb |
bunch-0.2.0 | lib/bunch/abstract_node.rb |
bunch-0.1.0 | lib/bunch/abstract_node.rb |