Class: AndParcel::Parcel
- Inherits:
-
Object
- Object
- AndParcel::Parcel
- Defined in:
- lib/andparcel/parcel.rb
Class Method Summary collapse
- .install(parcel, opts = {}) ⇒ Object
- .lint(pkg_info, opts = {}) ⇒ Object
- .package(pkg_info, opts = {}) ⇒ Object
- .remove(parcel_name, opts = {}) ⇒ Object
Instance Method Summary collapse
-
#initialize(cat) ⇒ Parcel
constructor
A new instance of Parcel.
Constructor Details
#initialize(cat) ⇒ Parcel
Returns a new instance of Parcel.
69 70 71 |
# File 'lib/andparcel/parcel.rb', line 69 def initialize(cat) # todo end |
Class Method Details
.install(parcel, opts = {}) ⇒ Object
54 55 56 57 |
# File 'lib/andparcel/parcel.rb', line 54 def self.install(parcel, opts={}) AndParcel.init InstallRequest.new(opts).install(parcel) end |
.lint(pkg_info, opts = {}) ⇒ Object
64 65 66 67 |
# File 'lib/andparcel/parcel.rb', line 64 def self.lint(pkg_info, opts={}) AndParcel.init LintRequest.new(opts).lint(pkg_info) end |
.package(pkg_info, opts = {}) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/andparcel/parcel.rb', line 39 def self.package(pkg_info, opts={}) AndParcel.init if !opts[:project] opts[:project]=File.dirname(pkg_info) pkg_info=File.basename(pkg_info) end lint_opts=opts.dup if LintRequest.new(lint_opts).lint(pkg_info) PackageRequest.new(opts).package(pkg_info) end end |
.remove(parcel_name, opts = {}) ⇒ Object
59 60 61 62 |
# File 'lib/andparcel/parcel.rb', line 59 def self.remove(parcel_name, opts={}) AndParcel.init RemoveRequest.new(opts).remove(parcel_name) end |