Module: Octopus
- Defined in:
- lib/octopus.rb
Defined Under Namespace
Modules: Association, Controller, Migration, Model, Persistence Classes: Proxy, ScopeProxy
Class Method Summary collapse
- .config ⇒ Object
-
.directory ⇒ Object
Returns the Rails.root_to_s when you are using rails Running the current directory in a generic Ruby process.
- .env ⇒ Object
Class Method Details
.config ⇒ Object
8 9 10 |
# File 'lib/octopus.rb', line 8 def self.config() @config ||= YAML.load_file(Octopus.directory() + "/config/shards.yml") end |
.directory ⇒ Object
Returns the Rails.root_to_s when you are using rails Running the current directory in a generic Ruby process
14 15 16 |
# File 'lib/octopus.rb', line 14 def self.directory() @directory ||= defined?(Rails) ? Rails.root.to_s : Dir.pwd end |
.env ⇒ Object
4 5 6 |
# File 'lib/octopus.rb', line 4 def self.env() @env ||= defined?(Rails) ? Rails.env.to_s : "production" end |