Module: Mobility::Plugins::Backend::ClassMethods

Defined in:
lib/mobility/plugins/backend.rb

Instance Method Summary collapse

Instance Method Details

#mobility_backend_class(name) ⇒ Class

Return backend class for a given attribute name.

Parameters:

  • Name (Symbol, String)

    of attribute

Returns:

  • (Class)

    Backend class



156
157
158
159
160
# File 'lib/mobility/plugins/backend.rb', line 156

def mobility_backend_class(name)
  mobility_backend_classes.fetch(name.to_sym)
rescue KeyError
  raise KeyError, "No backend for: #{name}"
end