Class: OozieClient::Config
- Inherits:
-
Object
- Object
- OozieClient::Config
- Defined in:
- lib/oozie-client/config.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#oozie_url ⇒ Object
readonly
Returns the value of attribute oozie_url.
Instance Method Summary collapse
-
#initialize(oozie_url, options = {}) ⇒ Config
constructor
A new instance of Config.
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, ={}) @oozie_url = oozie_url = .select { |key| [:user, :password, :headers, :timeout, :open_timeout].member? key } [:timeout] ||= 20 [:open_timeout] ||= 5 @client = RestClient::Resource.new "#{oozie_url}/v1", end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/oozie-client/config.rb', line 5 def client @client end |
#oozie_url ⇒ Object (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 |