Class: VagrantPlugins::Memset::Action::ConnectMemset

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-memset/action/connect_memset.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ ConnectMemset

Returns a new instance of ConnectMemset.



7
8
9
# File 'lib/vagrant-memset/action/connect_memset.rb', line 7

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

Instance Method Details

#call(env) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/vagrant-memset/action/connect_memset.rb', line 11

def call (env)

  # It connects to Memset API
  config = env[:machine].provider_config
  api_url = "https://:@api.memset.com/v1/xmlrpc".insert(8,config.api_key)
  env[:memset_compute]=XMLRPC::Client.new2(api_url)
  
  @app.call(env)
end