Class: HaveAPI::Fs::Components::ProxyDir
- Inherits:
-
Directory
- Object
- HaveAPI::Fs::Component
- Directory
- HaveAPI::Fs::Components::ProxyDir
- Defined in:
- lib/haveapi/fs/components/proxy_dir.rb
Constant Summary
Constants included from Help
Instance Attribute Summary
Attributes inherited from HaveAPI::Fs::Component
#atime, #context, #ctime, #mtime
Instance Method Summary collapse
- #contents ⇒ Object
-
#initialize(path) ⇒ ProxyDir
constructor
A new instance of ProxyDir.
- #setup ⇒ Object
- #times ⇒ Object
Methods inherited from Directory
Methods included from Help
Methods inherited from HaveAPI::Fs::Component
#abspath, #bound=, #bound?, children_reader, component, #directory?, #executable?, #file?, #find, inherited, #invalid?, #invalidate, #parent, #path, #readable?, #reset, #title, #unsaved?, #use, #writable?
Constructor Details
#initialize(path) ⇒ ProxyDir
Returns a new instance of ProxyDir.
3 4 5 6 |
# File 'lib/haveapi/fs/components/proxy_dir.rb', line 3 def initialize(path) super() @path = path end |
Instance Method Details
#contents ⇒ Object
14 15 16 |
# File 'lib/haveapi/fs/components/proxy_dir.rb', line 14 def contents @dir.entries[2..-1] end |
#setup ⇒ Object
8 9 10 11 12 |
# File 'lib/haveapi/fs/components/proxy_dir.rb', line 8 def setup super @dir = ::Dir.new(@path) end |
#times ⇒ Object
18 19 20 21 |
# File 'lib/haveapi/fs/components/proxy_dir.rb', line 18 def times st = ::File.stat(@path) [st.atime, st.mtime, st.ctime] end |