Class: Onoma::Record::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/onoma/record/base.rb

Class Method Summary collapse

Class Method Details

.method_missing(*args, &block) ⇒ Object



6
7
8
# File 'lib/onoma/record/base.rb', line 6

def method_missing(*args, &block)
  Onoma.find_or_initialize(name.tableize.sub(%r{\Aonoma/}, '')).send(*args, &block)
end

.respond_to?(method_name) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/onoma/record/base.rb', line 10

def respond_to?(method_name)
  Onoma.find_or_initialize(name.tableize.sub(%r{\Aonoma/}, '')).respond_to?(method_name) || super
end