Module: Spare::ModelSchema

Included in:
ActiveRecord::StoredProcedure
Defined in:
lib/spare/model_schema.rb

Instance Method Summary collapse

Instance Method Details

#schemaObject



4
5
6
# File 'lib/spare/model_schema.rb', line 4

def schema
  table_name_prefix
end

#schema=(schema) ⇒ Object



8
9
10
# File 'lib/spare/model_schema.rb', line 8

def schema=schema
  self.table_name_prefix = schema
end

#stored_procedureObject



12
13
14
# File 'lib/spare/model_schema.rb', line 12

def stored_procedure
  connection.schema_cache.stored_procedure(self.stored_procedure_name)
end

#stored_procedure_nameObject



20
21
22
# File 'lib/spare/model_schema.rb', line 20

def stored_procedure_name
  table_name
end

#stored_procedure_name=(stored_procedure_name) ⇒ Object



16
17
18
# File 'lib/spare/model_schema.rb', line 16

def stored_procedure_name=stored_procedure_name
  self.table_name=stored_procedure_name
end