Class: EacFs::Traverser
Instance Attribute Summary collapse
-
#check_directory ⇒ Object
Returns the value of attribute check_directory.
-
#check_file ⇒ Object
Returns the value of attribute check_file.
-
#hidden_directories ⇒ Object
Returns the value of attribute hidden_directories.
-
#recursive ⇒ Object
Returns the value of attribute recursive.
-
#sort ⇒ Object
Returns the value of attribute sort.
Instance Method Summary collapse
- #check_path(path) ⇒ Object
- #hidden_directories? ⇒ Boolean
-
#initialize(options = {}) ⇒ Traverser
constructor
A new instance of Traverser.
- #recursive? ⇒ Boolean
- #sort? ⇒ Boolean
Constructor Details
#initialize(options = {}) ⇒ Traverser
Returns a new instance of Traverser.
7 8 9 10 11 |
# File 'lib/eac_fs/traverser.rb', line 7 def initialize( = {}) .each do |accessor, value| send("#{accessor}=", value) end end |
Instance Attribute Details
#check_directory ⇒ Object
Returns the value of attribute check_directory.
5 6 7 |
# File 'lib/eac_fs/traverser.rb', line 5 def check_directory @check_directory end |
#check_file ⇒ Object
Returns the value of attribute check_file.
5 6 7 |
# File 'lib/eac_fs/traverser.rb', line 5 def check_file @check_file end |
#hidden_directories ⇒ Object
Returns the value of attribute hidden_directories.
5 6 7 |
# File 'lib/eac_fs/traverser.rb', line 5 def hidden_directories @hidden_directories end |
#recursive ⇒ Object
Returns the value of attribute recursive.
5 6 7 |
# File 'lib/eac_fs/traverser.rb', line 5 def recursive @recursive end |
#sort ⇒ Object
Returns the value of attribute sort.
5 6 7 |
# File 'lib/eac_fs/traverser.rb', line 5 def sort @sort end |
Instance Method Details
#check_path(path) ⇒ Object
13 14 15 16 |
# File 'lib/eac_fs/traverser.rb', line 13 def check_path(path) path = ::Pathname.new(path.to_s) unless path.is_a?(::Pathname) internal_check_path(path, 0) end |
#hidden_directories? ⇒ Boolean
18 19 20 |
# File 'lib/eac_fs/traverser.rb', line 18 def hidden_directories? boolean_value(hidden_directories) end |
#recursive? ⇒ Boolean
22 23 24 |
# File 'lib/eac_fs/traverser.rb', line 22 def recursive? boolean_value(recursive) end |
#sort? ⇒ Boolean
26 27 28 |
# File 'lib/eac_fs/traverser.rb', line 26 def sort? boolean_value(sort) end |