Class: HaveAPI::Fs::Components::ComponentList
- Inherits:
-
File
- Object
- HaveAPI::Fs::Component
- File
- HaveAPI::Fs::Components::ComponentList
- Defined in:
- lib/haveapi/fs/components/component_list.rb
Instance Attribute Summary
Attributes inherited from HaveAPI::Fs::Component
#atime, #context, #ctime, #mtime
Instance Method Summary collapse
Methods inherited from File
#file?, #raw_close, #raw_open, #raw_read, #raw_sync, #raw_truncate, #raw_write, #size, #write
Methods inherited from HaveAPI::Fs::Component
#abspath, #bound=, #bound?, children_reader, component, #contents, #directory?, #executable?, #file?, #find, inherited, #initialize, #invalid?, #invalidate, #parent, #path, #readable?, #reset, #setup, #times, #title, #unsaved?, #use, #writable?
Constructor Details
This class inherits a constructor from HaveAPI::Fs::Component
Instance Method Details
#read ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/haveapi/fs/components/component_list.rb', line 3 def read str = component_list.map do |c| sprintf('%-50s %s', c.class.name, c.path) end.join("\n") str += "\n" unless str.empty? str end |