Class: Npm::Rails::Package
- Inherits:
-
Object
- Object
- Npm::Rails::Package
- Defined in:
- lib/npm/rails/package.rb
Instance Attribute Summary collapse
-
#build_name ⇒ Object
readonly
Returns the value of attribute build_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #development? ⇒ Boolean
-
#initialize(name, version, options = {}) ⇒ Package
constructor
A new instance of Package.
- #should_require? ⇒ Boolean
Constructor Details
#initialize(name, version, options = {}) ⇒ Package
Returns a new instance of Package.
9 10 11 12 13 14 15 |
# File 'lib/npm/rails/package.rb', line 9 def initialize(name, version, = {}) @name = name @version = version @development = .fetch(:development, false) @build_name = .fetch(:build_name, create_build_name_from_name) @require = .fetch(:require, true) end |
Instance Attribute Details
#build_name ⇒ Object (readonly)
Returns the value of attribute build_name.
7 8 9 |
# File 'lib/npm/rails/package.rb', line 7 def build_name @build_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/npm/rails/package.rb', line 5 def name @name end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
6 7 8 |
# File 'lib/npm/rails/package.rb', line 6 def version @version end |
Instance Method Details
#development? ⇒ Boolean
17 18 19 |
# File 'lib/npm/rails/package.rb', line 17 def development? @development end |
#should_require? ⇒ Boolean
21 22 23 |
# File 'lib/npm/rails/package.rb', line 21 def should_require? @require end |