module DateSupercharger
Constants
- VERSION
Public Class Methods
method_missing(method_sym, *arguments, &block)
click to toggle source
Calls superclass method
# File lib/date_supercharger.rb, line 10 def self.method_missing(method_sym, *arguments, &block) return super unless descends_from_active_record? matcher = Matcher.new(self,method_sym) if matcher.match? method_definer = MethodDefiner.new(self) method_definer.define(attribute: matcher.attribute, suffix: matcher.suffix) send(method_sym, *arguments) else super end end
respond_to?(method_sym, include_private = false)
click to toggle source
Calls superclass method
# File lib/date_supercharger.rb, line 23 def self.respond_to?(method_sym, include_private = false) return super unless descends_from_active_record? if Matcher.new(self,method_sym).match? true else super end end