Top Level Namespace

Instance Method Summary collapse

Instance Method Details

#set_const(name, value, **opts) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/set_const.rb', line 5

def set_const(name, value, **opts)
  parent = opts[:parent] || Object

  silent(:stderr) do
    parent.send(:const_set, name, value)
  end

  value
end