Class: CanTango::Configuration::Engines::Store

Inherits:
Object
  • Object
show all
Includes:
Factory, ClassExt
Defined in:
lib/cantango/configuration/engines/store.rb

Instance Attribute Summary

Attributes included from Factory

#default_class

Instance Method Summary collapse

Methods included from Factory

#call_factory, #clear!, #default_factory, #factory, #factory_build, #options, #options=

Instance Method Details

#default_typeObject



18
19
20
# File 'lib/cantango/configuration/engines/store.rb', line 18

def default_type
  @default_type || :memory
end

#default_type=(type) ⇒ Object

Raises:

  • (ArgumentError)


13
14
15
16
# File 'lib/cantango/configuration/engines/store.rb', line 13

def default_type= type
  raise ArgumentError, "Must be a String or Symbol, was #{type}" if !type.kind_of_label?
  @default_type = type.to_sym
end

#type_optionsObject



9
10
11
# File 'lib/cantango/configuration/engines/store.rb', line 9

def type_options
  {:type => default_type}
end