Module: AdminIt::Config
- Defined in:
- lib/admin_it/config.rb
Class Method Summary collapse
- .controller ⇒ Object
- .controller=(value) ⇒ Object
- .google_maps_key ⇒ Object
- .google_maps_key=(value) ⇒ Object
- .root ⇒ Object
- .root=(value) ⇒ Object
- .s3 ⇒ Object
- .s3=(value) ⇒ Object
Class Method Details
.controller ⇒ Object
14 15 16 |
# File 'lib/admin_it/config.rb', line 14 def self.controller @controller ||= ActionController::Base end |
.controller=(value) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/admin_it/config.rb', line 18 def self.controller=(value) unless value <= ActionController::Base fail ArgumentError, 'Wrong controller' end @controller = value end |
.google_maps_key ⇒ Object
34 35 36 |
# File 'lib/admin_it/config.rb', line 34 def self.google_maps_key @google_maps_key end |
.google_maps_key=(value) ⇒ Object
38 39 40 |
# File 'lib/admin_it/config.rb', line 38 def self.google_maps_key=(value) @google_maps_key = value end |
.root ⇒ Object
4 5 6 |
# File 'lib/admin_it/config.rb', line 4 def self.root @root ||= Rails.root.join('app', 'admin_it') end |
.root=(value) ⇒ Object
8 9 10 11 12 |
# File 'lib/admin_it/config.rb', line 8 def self.root=(value) value = File.(value, Rails.root) fail ArgumentError unless File.directory?(value) @root = value end |
.s3 ⇒ Object
25 26 27 |
# File 'lib/admin_it/config.rb', line 25 def self.s3 @s3 ||= {} end |
.s3=(value) ⇒ Object
29 30 31 32 |
# File 'lib/admin_it/config.rb', line 29 def self.s3=(value) fail ArgumentError, 'Wrong S3 options' unless value.is_a?(Hash) @s3 = value end |