Class: Monetra::Configuration
- Inherits:
-
Object
- Object
- Monetra::Configuration
- Defined in:
- lib/monetra/configuration.rb
Class Method Summary collapse
- .host ⇒ Object
- .host=(value) ⇒ Object
- .options(options_or_path_to = nil) ⇒ Object
- .password ⇒ Object
- .password=(value) ⇒ Object
- .port ⇒ Object
- .port=(value) ⇒ Object
- .use_ssl=(value) ⇒ Object
- .use_ssl? ⇒ Boolean
- .user_name ⇒ Object
- .user_name=(value) ⇒ Object
Class Method Details
.host ⇒ Object
31 32 33 |
# File 'lib/monetra/configuration.rb', line 31 def host Monetra::Configuration.[:host] end |
.host=(value) ⇒ Object
35 36 37 |
# File 'lib/monetra/configuration.rb', line 35 def host=(value) Monetra::Configuration.[:host] = value end |
.options(options_or_path_to = nil) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/monetra/configuration.rb', line 4 def (=nil) @options ||= case .class.to_s when "String" YAML::load_file().symbolize_keys when "Hash" .symbolize_keys when "NilClass" YAML::load_file(File.join(Rails.root, 'config', 'monetra.yml'))[Rails.env].symbolize_keys if defined?(Rails) end end |
.password ⇒ Object
23 24 25 |
# File 'lib/monetra/configuration.rb', line 23 def password Monetra::Configuration.[:password] end |
.password=(value) ⇒ Object
27 28 29 |
# File 'lib/monetra/configuration.rb', line 27 def password=(value) Monetra::Configuration.[:password] = value end |
.port ⇒ Object
39 40 41 |
# File 'lib/monetra/configuration.rb', line 39 def port Monetra::Configuration.[:port] end |
.port=(value) ⇒ Object
43 44 45 |
# File 'lib/monetra/configuration.rb', line 43 def port=(value) Monetra::Configuration.[:port] = value end |
.use_ssl=(value) ⇒ Object
51 52 53 |
# File 'lib/monetra/configuration.rb', line 51 def use_ssl=(value) Monetra::Configuration.[:use_ssl] = value end |
.use_ssl? ⇒ Boolean
47 48 49 |
# File 'lib/monetra/configuration.rb', line 47 def use_ssl? Monetra::Configuration.[:use_ssl] end |
.user_name ⇒ Object
15 16 17 |
# File 'lib/monetra/configuration.rb', line 15 def user_name Monetra::Configuration.[:user_name] end |
.user_name=(value) ⇒ Object
19 20 21 |
# File 'lib/monetra/configuration.rb', line 19 def user_name=(value) Monetra::Configuration.[:user_name] = value end |