Class: Papers::LicenseValidator
- Inherits:
-
Object
- Object
- Papers::LicenseValidator
- Defined in:
- lib/papers/license_validator.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize ⇒ LicenseValidator
constructor
A new instance of LicenseValidator.
- #manifest ⇒ Object
- #pretty_gem_list ⇒ Object
- #pretty_js_list ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ LicenseValidator
Returns a new instance of LicenseValidator.
11 12 13 |
# File 'lib/papers/license_validator.rb', line 11 def initialize @errors = [] end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
9 10 11 |
# File 'lib/papers/license_validator.rb', line 9 def errors @errors end |
Instance Method Details
#manifest ⇒ Object
24 25 26 |
# File 'lib/papers/license_validator.rb', line 24 def manifest @manifest ||= YAML.load_file(Papers.config.manifest_file) end |
#pretty_gem_list ⇒ Object
28 29 30 |
# File 'lib/papers/license_validator.rb', line 28 def pretty_gem_list Gem.all_from_manifest(manifest).map(&:pretty_hash) end |
#pretty_js_list ⇒ Object
32 33 34 |
# File 'lib/papers/license_validator.rb', line 32 def pretty_js_list Javascript.all_from_manifest(manifest).map(&:pretty_hash) end |