lib/puppet-debugger/support/scope.rb in puppet-debugger-0.4.1 vs lib/puppet-debugger/support/scope.rb in puppet-debugger-0.4.2
- old
+ new
@@ -1,17 +1,16 @@
+# frozen_string_literal: true
module PuppetDebugger
module Support
module Scope
def set_scope(value)
@scope = value
end
# @return [Scope] puppet scope object
def scope
- unless @scope
- @scope ||= create_scope
- end
+ @scope ||= create_scope unless @scope
@scope
end
def create_scope
do_initialize
@@ -32,10 +31,10 @@
scope
end
# returns a hash of varaibles that are currently in scope
def scope_vars
- vars = scope.to_hash.delete_if {| key, value | node.facts.values.key?(key.to_sym) }
+ vars = scope.to_hash.delete_if { |key, _value| node.facts.values.key?(key.to_sym) }
vars['facts'] = 'removed by the puppet-debugger'
end
end
end
end