Method: Brief::Model::ClassMethods#method_missing

Defined in:
lib/brief/model.rb

#method_missing(meth, *args, &block) ⇒ Object



184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/brief/model.rb', line 184

def method_missing(meth, *args, &block)
  if %w(meta content template example actions helpers).include?(meth.to_s)
    definition.send(meth, *args, &block)
    finalize
  elsif %w(defined_helper_methods defined_actions).include?(meth.to_s)
    definition.send(meth)
  elsif meth.to_s.match(/^on_(.*)_change$/)
    create_change_handler(Regexp.last_match[1], *args, &block)
  else
    super
  end
end