summaryrefslogtreecommitdiff
path: root/lib/rcm.rb
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-12-07 14:36:21 +0200
committerPaul Buetow <paul@buetow.org>2024-12-07 14:36:21 +0200
commitf0b0dae5bb2e16cf45223fc31396708bd069d06c (patch)
tree5a7f3cd159c8d7029006fb900ec79dad05e0e212 /lib/rcm.rb
parent7d5264aea075c3845e6d5e4be65aaacdea54e71f (diff)
cosmetics
Diffstat (limited to 'lib/rcm.rb')
-rw-r--r--lib/rcm.rb47
1 files changed, 0 insertions, 47 deletions
diff --git a/lib/rcm.rb b/lib/rcm.rb
deleted file mode 100644
index a740cb2..0000000
--- a/lib/rcm.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-require_relative 'config'
-require_relative 'options'
-require_relative 'log'
-
-Dir["#{Dir.pwd}/lib/dslkeywords/*.rb"].each { |m| require m }
-
-# Ruby Configiration Management system
-module RCM
- # Here all starts
- class RCM
- attr_reader :id
-
- @@rcm_counter = -1
- @@objs = {}
-
- include Config
- include Options
- include Log
-
- def initialize
- @@rcm_counter += 1
- @id = "#{self.class}(#{@@rcm_counter})"
- @conds_met = true
- @scheduled = []
- end
-
- def to_s
- "RCM #{@number}"
- end
-
- def do!
- @scheduled.each(&:do!)
- end
-
- def <<(obj)
- fatal_exit "Object #{obj.id} already declared!" if @@objs.key?(obj.id)
- @scheduled << @@objs[obj.id] = obj
- end
- end
-end
-
-def make_it_so(&block)
- rcm = RCM::RCM.new
- rcm.info('Making it so...')
- rcm.instance_eval(&block)
- rcm.do!
-end