Module: Oedipus::DataMapper
- Defined in:
- lib/oedipus/data_mapper.rb,
lib/oedipus/data_mapper/index.rb,
lib/oedipus/data_mapper/version.rb,
lib/oedipus/data_mapper/collection.rb,
lib/oedipus/data_mapper/pagination.rb,
lib/oedipus/data_mapper/conversions.rb,
lib/oedipus/data_mapper/default_proc.rb
Defined Under Namespace
Modules: Conversions, DefaultProc, Pagination Classes: Collection, Index
Constant Summary collapse
- VERSION =
"0.0.7"
Class Method Summary collapse
-
.config ⇒ Struct<host, port>
Returns the configuration options.
-
.configure {|config| ... } ⇒ Object
Set up Oedipus::DataMapper with connection details.
-
.connection ⇒ Connection
Returns the configured connection.
Class Method Details
.config ⇒ Struct<host, port>
Returns the configuration options.
40 41 42 |
# File 'lib/oedipus/data_mapper.rb', line 40 def config @config ||= Struct.new(:host, :port, :verify).new("localhost", 9306, true) end |
.configure {|config| ... } ⇒ Object
Set up Oedipus::DataMapper with connection details.
26 27 28 |
# File 'lib/oedipus/data_mapper.rb', line 26 def configure yield config end |
.connection ⇒ Connection
Returns the configured connection.
33 34 35 |
# File 'lib/oedipus/data_mapper.rb', line 33 def connection @connection ||= Connection.new(host: config.host, port: config.port, verify: config.verify) end |