Sha256: 70d416d16fa3e8c690754692c9fc2594b685bd7897b4320a3ef5d5a49dc3d99d
Contents?: true
Size: 1.19 KB
Versions: 1
Compression:
Stored size: 1.19 KB
Contents
require 'fileutils' require 'folio/errors' require 'folio/prompt' require 'folio/fileobject' require 'folio/directory' require 'folio/document' require 'folio/link' require 'folio/device' require 'folio/socket' require 'folio/pipe' #def folio(path) # Folio.new(path) #end # = Folio # module Folio def self.file(*path) FileObject[*path] end def self.[](*path) Prompt.new(*path) end end #pwd() =begin if ::File.blockdev?(path) Device.new(path) elsif chardev?(path) Device.new(path) elsif pipe?(path) Device.new(path) elsif ::File.socket?(path) Socket.new(path) elsif ::File.directory?(path) Directory.new(path) else Document.new(path) end end =end # delegate ? =begin def initialize(path) @path = path = ::File.join(*path) raise FileNotFound unless ::File.exist?(path) if ::File.blockdev?(path) or chardev?(path) @delegate = Device.new(path) elsif ::File.link?(path) @delegate = Link.new(path) elsif ::File.directory?(path) @delegate = Directory.new(path) else @delegate = Document.new(path) end end def delete @delegate.delete @delegate = nil end =end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
folio-0.1.0 | lib/folio.rb |