lib/appfuel/handler/base.rb in appfuel-0.2.3 vs lib/appfuel/handler/base.rb in appfuel-0.2.4
- old
+ new
@@ -12,11 +12,11 @@
# Register the extending class with the application container
#
# @param klass [Class] the handler class that is inheriting this
# @return nil
def inherited(klass)
- register_container_class(klass)
+ stage_class_for_registration(klass)
end
def response_handler
@response_handler ||= ResponseHandler.new
end
@@ -79,9 +79,19 @@
self.class.ok(value)
end
def error(*args)
self.class.error(*args)
+ end
+
+ def search(repo, domain, options = {})
+ criteria = build_criteria(domain, options)
+ repo = data[repo]
+ repo.search(criteria)
+ end
+
+ def build_criteria(domain, options)
+
end
def present(name, data, inputs = {})
return data if inputs[:raw] == true