Sha256: e56e04ac879839d3fb40a95bfbdf3e025fb101bc9fc04576410eed2d93317500
Contents?: true
Size: 438 Bytes
Versions: 9
Compression:
Stored size: 438 Bytes
Contents
module Bunch class FileNode < AbstractNode attr_accessor :name, :target_extension def initialize(fn) @filename = fn if fn =~ /\.[^.]*$/ @name = File.basename($`) @target_extension = $& else @name = File.basename(@filename) @target_extension = nil end end def content File.read(@filename) end def inspect @filename.inspect end end end
Version data entries
9 entries across 9 versions & 1 rubygems