lib/itamae-mitsurin/mitsurin/base.rb in itamae-mitsurin-1.0.2 vs lib/itamae-mitsurin/mitsurin/base.rb in itamae-mitsurin-1.0.3
- old
+ new
@@ -25,9 +25,19 @@
end
end
end
end
+ class ::Regexp
+ def match?(m)
+ if self.match(m)
+ true
+ else
+ false
+ end
+ end
+ end
+
class << self
# def get_roles(node_file)
# roles = []
# JSON.parse(File.read(node_file))['run_list'].each do |role|
# roles << role.gsub(/role\[(.+)\]/, '\1') if /role\[(.+)\]/.match?(role)