module Her::Model::DeprecatedMethods
@private
Public Class Methods
deprecate!(old, new, object, *args)
click to toggle source
# File lib/her/model/deprecated_methods.rb, line 7 def self.deprecate!(old, new, object, *args) line = begin raise StandardError rescue StandardError => e e.backtrace[2] end warn "#{line} - The `#{old}` method is deprecated and may be removed soon. Please update your code with `#{new}` instead." object.send(new, *args) end
Public Instance Methods
assign_data(*args)
click to toggle source
# File lib/her/model/deprecated_methods.rb, line 30 def assign_data(*args) Her::Model::DeprecatedMethods.deprecate! :assign_data, :assign_attributes, self, *args end
data(*args)
click to toggle source
# File lib/her/model/deprecated_methods.rb, line 18 def data(*args) Her::Model::DeprecatedMethods.deprecate! :data, :attributes, self, *args end
data=(*args)
click to toggle source
# File lib/her/model/deprecated_methods.rb, line 22 def data=(*args) Her::Model::DeprecatedMethods.deprecate! :data=, :attributes=, self, *args end
get_data(*args)
click to toggle source
# File lib/her/model/deprecated_methods.rb, line 38 def get_data(*args) Her::Model::DeprecatedMethods.deprecate! :get_data, :get_attribute, self, *args end
has_data?(*args)
click to toggle source
# File lib/her/model/deprecated_methods.rb, line 34 def has_data?(*args) Her::Model::DeprecatedMethods.deprecate! :has_data?, :has_attribute?, self, *args end
update_attributes(*args)
click to toggle source
# File lib/her/model/deprecated_methods.rb, line 26 def update_attributes(*args) Her::Model::DeprecatedMethods.deprecate! :update_attributes, :assign_attributes, self, *args end