Class: Instadoc::Java::PathnameSeeker
- Inherits:
-
Object
- Object
- Instadoc::Java::PathnameSeeker
- Defined in:
- lib/instadoc/java/pathname_seeker.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ PathnameSeeker
constructor
A new instance of PathnameSeeker.
- #search_in(base_pathname) ⇒ Object
Constructor Details
#initialize(config) ⇒ PathnameSeeker
Returns a new instance of PathnameSeeker.
6 7 8 |
# File 'lib/instadoc/java/pathname_seeker.rb', line 6 def initialize(config) @config = config end |
Instance Method Details
#search_in(base_pathname) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/instadoc/java/pathname_seeker.rb', line 10 def search_in(base_pathname) raise(ArgumentError, "base_pathname must not be null.") if base_pathname.nil? path_names = Array.new files_path = File.join(base_pathname, "**", "*.java") Dir.glob(files_path) { |file| path_name = Pathname.new(file).realpath path_names << path_name } path_names end |