Class: Object

Inherits:
BasicObject
Defined in:
lib/gooddata/extensions/object.rb

Overview

Copyright (c) 2010-2017 GoodData Corporation. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.set_const(name, val) ⇒ Object



6
7
8
9
# File 'lib/gooddata/extensions/object.rb', line 6

def set_const(name, val)
  send(:remove_const, name) if const_defined?(name)
  send(:const_set, name, val)
end

Instance Method Details

#set_const(name, val) ⇒ Object



12
13
14
15
# File 'lib/gooddata/extensions/object.rb', line 12

def set_const(name, val)
  send(:remove_const, name) if const_defined?(name)
  send(:const_set, name, val)
end