Class: Detroit::RubyProject
Overview
Instance Attribute Summary
Attributes inherited from Project
#log, #root
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Project
#config, factory, #initialize, lookup, #method_missing, root
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Detroit::Project
Class Method Details
.project?(root) ⇒ Boolean
TODO:
While this will work well in the vase majority of cases, there may be a few outlays.
looking for a .gemspec file.
100
101
102
|
# File 'lib/detroit/project.rb', line 100
def self.project?(root)
Dir[File.join(root, "{*,}.gemspec")].first
end
|
Instance Method Details
#gemspec_file ⇒ Object
128
129
130
|
# File 'lib/detroit/project.rb', line 128
def gemspec_file
Dir[File.join(root, "{*,}.gemspec")].first
end
|
#index_file ⇒ Object
123
124
125
|
# File 'lib/detroit/project.rb', line 123
def index_file
Dir[File.join(root, ".index")].first
end
|
110
111
112
113
114
115
116
117
118
119
120
|
# File 'lib/detroit/project.rb', line 110
def metadata
@metadata ||= (
if index_file
Indexer::Metadata.open(root)
elsif file = gemspec_file
Indexer::Metadata.from_gemspec(file)
else
super end
)
end
|