Class: JBundle::Bundle
- Inherits:
-
Object
- Object
- JBundle::Bundle
- Includes:
- Enumerable, BundleUtils
- Defined in:
- lib/jbundle/bundle.rb
Instance Attribute Summary collapse
-
#licenses ⇒ Object
readonly
Returns the value of attribute licenses.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#original_name ⇒ Object
readonly
Returns the value of attribute original_name.
Instance Method Summary collapse
- #each(&block) ⇒ Object
- #file(f) ⇒ Object
-
#initialize(name) ⇒ Bundle
constructor
A new instance of Bundle.
- #license(license_file) ⇒ Object
Constructor Details
#initialize(name) ⇒ Bundle
Returns a new instance of Bundle.
10 11 12 13 14 |
# File 'lib/jbundle/bundle.rb', line 10 def initialize(name) @original_name, @name = parse_name(name) @files = [] @licenses = [] end |
Instance Attribute Details
#licenses ⇒ Object (readonly)
Returns the value of attribute licenses.
8 9 10 |
# File 'lib/jbundle/bundle.rb', line 8 def licenses @licenses end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/jbundle/bundle.rb', line 8 def name @name end |
#original_name ⇒ Object (readonly)
Returns the value of attribute original_name.
8 9 10 |
# File 'lib/jbundle/bundle.rb', line 8 def original_name @original_name end |
Instance Method Details
#each(&block) ⇒ Object
24 25 26 |
# File 'lib/jbundle/bundle.rb', line 24 def each(&block) @files.each &block end |
#file(f) ⇒ Object
16 17 18 |
# File 'lib/jbundle/bundle.rb', line 16 def file(f) @files << f end |
#license(license_file) ⇒ Object
20 21 22 |
# File 'lib/jbundle/bundle.rb', line 20 def license(license_file) @licenses << license_file end |