Class: Cartage::Manifest::ShowCommand

Inherits:
Command
  • Object
show all
Includes:
HandleMissingManifest
Defined in:
lib/cartage/manifest/commands.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods included from HandleMissingManifest

#handle_missing_manifest

Methods inherited from Command

#execute, #with_plugins

Constructor Details

#initialize(cartage) ⇒ ShowCommand

Returns a new instance of ShowCommand


79
80
81
82
83
84
85
# File 'lib/cartage/manifest/commands.rb', line 79

def initialize(cartage)
  super(cartage, 'show')
  takes_commands(false)
  short_desc('Show the files that will be included in the package.')

  @manifest = cartage.manifest
end

Instance Method Details

#performObject


87
88
89
90
91
92
93
# File 'lib/cartage/manifest/commands.rb', line 87

def perform(*)
  handle_missing_manifest do
    @manifest.resolve do |tmpfile|
      puts Pathname(tmpfile).read
    end
  end
end