Class: Eax::EaxDir
- Inherits:
-
Object
- Object
- Eax::EaxDir
- Defined in:
- lib/eax.rb
Instance Attribute Summary collapse
-
#eax_files ⇒ Object
Returns the value of attribute eax_files.
-
#list ⇒ Object
Returns the value of attribute list.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options) ⇒ EaxDir
constructor
A new instance of EaxDir.
- #to_s ⇒ Object
Constructor Details
#initialize(options) ⇒ EaxDir
Returns a new instance of EaxDir.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/eax.rb', line 24 def initialize() @eax_files = [] @options = hidden = (.all? or .long?) order( FileListing.list_files_in(.arguments.first || Dir.pwd, hidden: hidden), by: ([:sort] || :name).to_sym, desc: .reverse? ) end |
Instance Attribute Details
#eax_files ⇒ Object
Returns the value of attribute eax_files.
22 23 24 |
# File 'lib/eax.rb', line 22 def eax_files @eax_files end |
#list ⇒ Object
Returns the value of attribute list.
22 23 24 |
# File 'lib/eax.rb', line 22 def list @list end |
#options ⇒ Object
Returns the value of attribute options.
22 23 24 |
# File 'lib/eax.rb', line 22 def @options end |
Instance Method Details
#to_s ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/eax.rb', line 35 def to_s files_info = eax_files.map {|file| file.output() } if print_list? files_info.join("\n") else files_info.join(' ' * 3) end end |