Module: Barista::Extensions::InstanceMethods

Defined in:
lib/barista/extensions.rb

Instance Method Summary collapse

Instance Method Details

#deprecate!(object, method, other = nil) ⇒ Object



84
85
86
87
# File 'lib/barista/extensions.rb', line 84

def deprecate!(object, method, other = nil)
  klass_prefix = (object.is_a?(Class) || object.is_a?(Module)) ? "#{object.name}." : "#{object.class.name}#"
  warn "#{klass_prefix}#{method} is deprecated and will be removed in 1.0. #{other}".strip
end