Class: Docklean
- Inherits:
-
Object
- Object
- Docklean
- Includes:
- Base, Conf, Containers, Images
- Defined in:
- lib/docklean/base.rb,
lib/docklean.rb,
lib/docklean/conf.rb,
lib/docklean/error.rb,
lib/docklean/images.rb,
lib/docklean/containers.rb
Overview
Author: Tom Llewellyn-Smith <[email protected]>
Copyright: © Onix Consulting Limited 2012-2015. All rights reserved.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Defined Under Namespace
Modules: Base, Conf, Containers, Images Classes: ErrorNoConfiguration
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(config) ⇒ Docklean
constructor
A new instance of Docklean.
Methods included from Images
#cleanup_images, #delete_dangling
Methods included from Containers
#cleanup_containers, #get_containers
Methods included from Conf
#configured?, #get_conf, #read
Methods included from Base
Constructor Details
#initialize(config) ⇒ Docklean
Returns a new instance of Docklean.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/docklean.rb', line 32 def initialize(config) begin if File.exists?(config) then puts "info: #{config} exists using it" self.read(config) @docker_bin = self.get_conf('docker_bin') @max_age = self.get_conf('max_age') end rescue Docklean::ErrorNoConfiguration puts "error: please provide a YAML configuration" exit end end |
Instance Method Details
#dump ⇒ Object
47 48 49 |
# File 'lib/docklean.rb', line 47 def dump() puts self.inspect end |