Class: OozieClient::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/oozie-client/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(oozie_url, options = {}) ⇒ Config

Returns a new instance of Config.



7
8
9
10
11
12
13
# File 'lib/oozie-client/config.rb', line 7

def initialize(oozie_url, options={})
  @oozie_url = oozie_url
  net_options = options.select { |key| [:user, :password, :headers, :timeout, :open_timeout].member? key }
  net_options[:timeout] ||= 20
  net_options[:open_timeout] ||= 5
  @client = RestClient::Resource.new "#{oozie_url}/v1", net_options
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



5
6
7
# File 'lib/oozie-client/config.rb', line 5

def client
  @client
end

#oozie_urlObject (readonly)

Returns the value of attribute oozie_url.



4
5
6
# File 'lib/oozie-client/config.rb', line 4

def oozie_url
  @oozie_url
end