Module: MockFS::Adapter
Overview
Constant Summary
collapse
- @@delegated_methods =
[ :delete, :entries, :mtime, :size ]
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args) ⇒ Object
147
148
149
150
151
152
153
|
# File 'lib/mockfs.rb', line 147
def method_missing( sym, *args )
if @@delegated_methods.include?( sym )
node( args.first ).send( sym )
else
super
end
end
|
Instance Method Details
#node(nodename) ⇒ Object
155
|
# File 'lib/mockfs.rb', line 155
def node( nodename ); MockFileSystem.instance.node( nodename ); end
|
#respond_to?(sym) ⇒ Boolean
157
158
159
|
# File 'lib/mockfs.rb', line 157
def respond_to?( sym )
@@delegated_methods.include?( sym ) ? true : super
end
|