Class: Chef::TidyServer
- Inherits:
-
Object
- Object
- Chef::TidyServer
- Defined in:
- lib/chef/tidy_server.rb
Instance Attribute Summary collapse
-
#root_url ⇒ Object
Returns the value of attribute root_url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(root_url) ⇒ TidyServer
constructor
A new instance of TidyServer.
Constructor Details
#initialize(root_url) ⇒ TidyServer
Returns a new instance of TidyServer.
5 6 7 |
# File 'lib/chef/tidy_server.rb', line 5 def initialize(root_url) @root_url = root_url end |
Instance Attribute Details
#root_url ⇒ Object
Returns the value of attribute root_url.
3 4 5 |
# File 'lib/chef/tidy_server.rb', line 3 def root_url @root_url end |
Class Method Details
.from_chef_server_url(url) ⇒ Object
9 10 11 12 |
# File 'lib/chef/tidy_server.rb', line 9 def self.from_chef_server_url(url) url = url.gsub(%r{/organizations/+[^/]+/*$}, "") Chef::Server.new(url) end |