Module: Slingshot::Model::Naming::ClassMethods

Defined in:
lib/slingshot/model/naming.rb

Instance Method Summary collapse

Instance Method Details

#document_typeObject



12
13
14
# File 'lib/slingshot/model/naming.rb', line 12

def document_type
  model_name.singular
end

#index_name(name = nil) ⇒ Object



7
8
9
10
# File 'lib/slingshot/model/naming.rb', line 7

def index_name name=nil
  @index_name = name if name
  @index_name || model_name.plural
end