summaryrefslogtreecommitdiff
path: root/lib/rcm.rb
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-12-06 23:04:47 +0200
committerPaul Buetow <paul@buetow.org>2024-12-06 23:04:47 +0200
commit7686fe830946ae36957501f1656bb429c694b09e (patch)
treea6ac996e4a7cbbdc054c2a62c7ae374b61ed49af /lib/rcm.rb
parentbfdcad7efca071374de0be3124dcc92deeab681e (diff)
add log module
Diffstat (limited to 'lib/rcm.rb')
-rw-r--r--lib/rcm.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/rcm.rb b/lib/rcm.rb
index 0c3d028..d9880eb 100644
--- a/lib/rcm.rb
+++ b/lib/rcm.rb
@@ -2,15 +2,23 @@ Dir["#{Dir.pwd}/lib/autorequire/*.rb"].each { |m| require m }
# Ruby Configiration Management system
module RCM
-
# Here all starts
class RCM
+ @@rcm_counter = 0
+
include Config
include Options
+ include Log
def initialize
@objs = []
@conds_met = true
+ @@rcm_counter += 1
+ @number = @@rcm_counter
+ end
+
+ def to_s
+ "RCM #{@number}"
end
def do!
@@ -25,6 +33,7 @@ end
def make_it_so(&block)
rcm = RCM::RCM.new
+ rcm.info('Making it so...')
rcm.instance_eval(&block)
rcm.do!
end