module AbbreviatedMethods

Constants

VERSION

Public Instance Methods

method_missing(method_name, *args) click to toggle source
Calls superclass method
# File lib/abbreviated_methods.rb, line 12
def method_missing(method_name, *args)
  if public_methods.abbrev.keys.include?(method_name.to_s)
    send(public_methods.abbrev[method_name.to_s])
  else
    super
  end
end
methods_with_their_abbreviations() click to toggle source
# File lib/abbreviated_methods.rb, line 5
def methods_with_their_abbreviations
  public_methods.abbrev.each_with_object({}) do |(key, value), hsh|
    hsh[value] ||= []
    hsh[value] << key unless key == value || key == value.to_s
  end
end
respond_to?(method_name, *args) click to toggle source
Calls superclass method
# File lib/abbreviated_methods.rb, line 20
def respond_to?(method_name, *args)
  if public_methods.abbrev.keys.include?(method_name.to_s)
    true
  else
    super
  end
end
respond_to_missing?(method_name, *args) click to toggle source
Calls superclass method
# File lib/abbreviated_methods.rb, line 28
def respond_to_missing?(method_name, *args)
  if public_methods.abbrev.keys.include?(method_name.to_s)
    true
  else
    super
  end
end