Class: KRL_CMD::Checkout
- Inherits:
-
Object
- Object
- KRL_CMD::Checkout
- Defined in:
- lib/checkout.rb
Class Method Summary collapse
Instance Method Summary collapse
- #checkout ⇒ Object
-
#initialize(ruleset, options) ⇒ Checkout
constructor
A new instance of Checkout.
Constructor Details
#initialize(ruleset, options) ⇒ Checkout
Returns a new instance of Checkout.
16 17 18 19 20 21 22 23 |
# File 'lib/checkout.rb', line 16 def initialize(ruleset, ) @user = User.new @ruleset = ruleset @include_title = ["title"] @all = ["all"] app = KRL_COMMON::get_app rescue nil raise "You are already in an application directory: #{app.application_id}" if app end |
Class Method Details
.go(ruleset, options) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/checkout.rb', line 6 def self.go(ruleset, ) begin c = self.new(ruleset, ) c.checkout rescue Exception => e puts e. ap e.backtrace if $DEBUG end end |
Instance Method Details
#checkout ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/checkout.rb', line 25 def checkout if @all @user.applications["apps"].each do |app| begin @ruleset = app["appid"] do_checkout rescue => e puts e. end end else do_checkout end end |