Class: Monocle::Server

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/monocle/server.rb

Instance Method Summary collapse

Instance Method Details

#view_object(type, id) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/monocle/server.rb', line 13

def view_object(type, id)
  if object = type.classify.constantize.find(id)
    object.view!
    'o_0 +1'
  else
    'o_0'
  end
end