Class: Quick::FS::FSConstant

Inherits:
Object
  • Object
show all
Defined in:
lib/quick/fs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contentsObject



27
28
29
30
31
32
33
# File 'lib/quick/fs.rb', line 27

def contents
	if @contents.respond_to? :call
		@contents.call
	else
		@contents
	end
end

Instance Method Details

#read_file(path) ⇒ Object



39
40
41
# File 'lib/quick/fs.rb', line 39

def read_file(path)
	contents.to_s
end

#size(path) ⇒ Object



35
36
37
# File 'lib/quick/fs.rb', line 35

def size(path)
	contents.bytesize
end