Class: Distribute

Inherits:
Object
  • Object
show all
Defined in:
lib/distribute.rb,
lib/distribute/command.rb,
lib/distribute/version.rb

Direct Known Subclasses

Latest, Release

Defined Under Namespace

Classes: Command

Constant Summary collapse

VERSION =
"1.0.1"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(files, version = nil) ⇒ Distribute

Returns a new instance of Distribute.



9
10
11
12
# File 'lib/distribute.rb', line 9

def initialize(files, version = nil)
  @files = files
  @version = version
end

Instance Attribute Details

#filesObject

Returns the value of attribute files.



7
8
9
# File 'lib/distribute.rb', line 7

def files
  @files
end

#versionObject

Returns the value of attribute version.



7
8
9
# File 'lib/distribute.rb', line 7

def version
  @version
end

Instance Method Details

#distribute!Object



14
15
16
# File 'lib/distribute.rb', line 14

def distribute!
  (version ? build_release : build_latest).distribute!
end