Module: Get
- Extended by:
- Configuration
- Defined in:
- lib/get.rb,
lib/get/db.rb,
lib/get/errors.rb,
lib/get/parser.rb,
lib/get/builders.rb,
lib/get/run_methods.rb,
lib/get/configuration.rb,
lib/get/builders/base_builder.rb,
lib/get/builders/query_builder.rb,
lib/get/builders/ancestry_builder.rb
Defined Under Namespace
Modules: Builders, Configuration, Errors, RunMethods
Classes: Config, Db, Parser
Constant Summary
collapse
- GET_CLASS_REGEX =
/^(.*)(By|From)(.*)/
Class Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
adapter, configuration, configure, reset
Class Attribute Details
.configuration=(value) ⇒ Object
Sets the attribute configuration
18
19
20
|
# File 'lib/get.rb', line 18
def configuration=(value)
@configuration = value
end
|
Class Method Details
.const_missing(name) ⇒ Object
26
27
28
29
30
|
# File 'lib/get.rb', line 26
def const_missing(name)
parser = ::Get::Parser.new(name)
return super(name) unless parser.match?
Builders.generate_class(name, parser.method)
end
|
.included(base) ⇒ Object
20
21
22
23
24
|
# File 'lib/get.rb', line 20
def included(base)
base.class_eval do
extend ::Get::RunMethods
end
end
|
Instance Method Details
#run ⇒ Object
33
34
35
36
|
# File 'lib/get.rb', line 33
def run
run!
rescue ::Get::Errors::Base, Get::Errors::RecordNotFound
end
|
#run! ⇒ Object
38
39
40
41
42
|
# File 'lib/get.rb', line 38
def run!
call
rescue *Get.adapter.expected_horza_errors => e
raise ::Get::Errors::Base.new(e.message)
end
|