module Horza::Adapters::ClassMethods
Public Instance Methods
collection_entity_klass()
click to toggle source
# File lib/horza/adapters/class_methods.rb, line 28 def collection_entity_klass ::Horza::Entities::Collection end
context_for_entity(entity)
click to toggle source
# File lib/horza/adapters/class_methods.rb, line 16 def context_for_entity(entity) DependencyLoading.resolve_dependency(entity.to_s) end
expected_errors()
click to toggle source
# File lib/horza/adapters/class_methods.rb, line 8 def expected_errors expected_errors_map.keys end
expected_horza_errors()
click to toggle source
# File lib/horza/adapters/class_methods.rb, line 4 def expected_horza_errors [Horza::Errors::RecordNotFound, Horza::Errors::RecordInvalid] end
horza_error_from_orm_error(orm_error)
click to toggle source
# File lib/horza/adapters/class_methods.rb, line 12 def horza_error_from_orm_error(orm_error) expected_errors_map[orm_error] end
not_implemented_error()
click to toggle source
# File lib/horza/adapters/class_methods.rb, line 20 def not_implemented_error raise ::Horza::Errors::MethodNotImplemented, 'You must implement this method in your adapter.' end
single_entity_klass()
click to toggle source
# File lib/horza/adapters/class_methods.rb, line 24 def single_entity_klass ::Horza::Entities::Single end