Class: Detroit::RubyProject
Overview
Ruby Project class.
Instance Attribute Summary
Attributes inherited from Project
Class Method Summary collapse
-
.project?(root) ⇒ Boolean
looking for a .gemspec file.
Instance Method Summary collapse
Methods inherited from Project
#config, factory, #initialize, lookup, #method_missing, root
Constructor Details
This class inherits a constructor from Detroit::Project
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 |
#metadata ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/detroit/project.rb', line 110 def ||= ( if index_file Indexer::Metadata.open(root) elsif file = gemspec_file Indexer::Metadata.from_gemspec(file) else super # TODO: what metadata? end ) end |