Module: SnFoil
- Defined in:
- lib/snfoil/version.rb,
lib/snfoil.rb,
lib/snfoil/crud/context.rb,
lib/snfoil/crud/show_context.rb,
lib/snfoil/crud/build_context.rb,
lib/snfoil/crud/index_context.rb,
lib/snfoil/crud/setup_context.rb,
lib/snfoil/crud/change_context.rb,
lib/snfoil/crud/create_context.rb,
lib/snfoil/crud/update_context.rb,
lib/snfoil/crud/destroy_context.rb,
lib/snfoil/adapters/orms/base_adapter.rb,
lib/snfoil/adapters/orms/active_record.rb
Overview
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Defined Under Namespace
Modules: Adapters, CRUD
Classes: AuthorizationError, Error
Constant Summary
collapse
- VERSION =
'1.1.1'
Class Method Summary
collapse
Class Method Details
.adapter ⇒ Object
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# File 'lib/snfoil.rb', line 52
def adapter
return @adapter if @adapter
@adapter ||= if orm.instance_of?(String) || orm.instance_of?(Symbol)
if Object.const_defined?("SnFoil::Adapters::ORMs::#{orm.camelcase}")
"SnFoil::Adapters::ORMs::#{orm.camelcase}".constantize
else
orm.constantize
end
else
orm
end
end
|
66
67
68
|
# File 'lib/snfoil.rb', line 66
def configure
yield self
end
|
.logger ⇒ Object
46
47
48
49
50
|
# File 'lib/snfoil.rb', line 46
def logger
@logger ||= Logger.new($stdout).tap do |log|
log.progname = name
end
end
|