Module: FileSystem::Adapter
Overview
Constant Summary
collapse
- @@delegated_methods =
[ :delete, :entries, :mtime ]
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args) ⇒ Object
78
79
80
81
82
83
84
|
# File 'lib/filesystem.rb', line 78
def method_missing( sym, *args )
if @@delegated_methods.include?( sym )
get_node( args.first ).send( sym )
else
super
end
end
|
Instance Method Details
#get_node(nodename) ⇒ Object
76
|
# File 'lib/filesystem.rb', line 76
def get_node( nodename ); MockFileSystem.instance.get_node( nodename ); end
|
#respond_to?(sym) ⇒ Boolean
86
87
88
|
# File 'lib/filesystem.rb', line 86
def respond_to?( sym )
@@delegated_methods.include?( sym ) ? true : super
end
|