Class: Papers::Javascript
- Inherits:
-
DependencySpecification
- Object
- DependencySpecification
- Papers::Javascript
- Defined in:
- lib/papers/dependency_specification/javascript.rb
Instance Attribute Summary
Attributes inherited from DependencySpecification
#license, #license_url, #name, #project_url
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from DependencySpecification
#acceptable_license?, #initialize, #name_without_version
Constructor Details
This class inherits a constructor from Papers::DependencySpecification
Class Method Details
.introspected ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/papers/dependency_specification/javascript.rb', line 12 def self.introspected dirs = Papers.config.javascript_paths # TODO: add logic for determining rails. Is Rails.root better than Dir.pwd for such a case? root_regexp = /^#{Regexp.escape Dir.pwd.to_s}\// dirs.map { |dir| Dir["#{dir}/**/*.js"] }.flatten.map { |name| name.sub(root_regexp, '') } end |
.manifest_key ⇒ Object
20 21 22 |
# File 'lib/papers/dependency_specification/javascript.rb', line 20 def self.manifest_key "javascripts" end |
Instance Method Details
#pretty_hash ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/papers/dependency_specification/javascript.rb', line 3 def pretty_hash { name: @name, license: license, license_url: @license_url, project_url: @project_url } end |