Class: VagrantPlugins::Rimu::Actions::BillingMethods

Inherits:
AbstractAction show all
Includes:
Commands::Utils
Defined in:
lib/vagrant-rimu/actions/billing_methods.rb

Instance Method Summary collapse

Methods included from Commands::Utils

#display_table

Methods inherited from AbstractAction

#call

Constructor Details

#initialize(app, _env) ⇒ BillingMethods

Returns a new instance of BillingMethods.



10
11
12
# File 'lib/vagrant-rimu/actions/billing_methods.rb', line 10

def initialize(app, _env)
  @app = app
end

Instance Method Details

#execute(env) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/vagrant-rimu/actions/billing_methods.rb', line 14

def execute(env)
  rows = []
  env[:rimu_api].billing_methods.each do |b|
    rows << [b.billing_oid, b.billing_method_type, b.description]
  end
  display_table(env, ['ID', 'Type', 'Description'], rows)

  @app.call(env)
end