Method: Brief::Model::AccessorMethods#method_missing

Defined in:
lib/brief/model.rb

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



57
58
59
60
61
62
63
64
65
66
67
# File 'lib/brief/model.rb', line 57

def method_missing(meth, *args, &block)
  if args.empty?
    if document.respond_to?(meth)
      document.send(meth, *args, &block)
    else
      document.data && document.data.key?(meth) ? data[meth] : extracted.send(meth)
    end
  else
    super
  end
end