Class: JBundle::Bundle

Inherits:
Object
  • Object
show all
Includes:
Enumerable, BundleUtils
Defined in:
lib/jbundle/bundle.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#licensesObject (readonly)

Returns the value of attribute licenses.



8
9
10
# File 'lib/jbundle/bundle.rb', line 8

def licenses
  @licenses
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/jbundle/bundle.rb', line 8

def name
  @name
end

#original_nameObject (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