Class: Upmin::Configuration
- Inherits:
-
Object
- Object
- Upmin::Configuration
- Defined in:
- lib/upmin/configuration.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #items_per_page ⇒ Object
- #items_per_page=(items) ⇒ Object
- #models ⇒ Object
- #models=(models) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
18 19 20 |
# File 'lib/upmin/configuration.rb', line 18 def initialize ::Rails.application.eager_load! end |
Instance Attribute Details
#colors ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/upmin/configuration.rb', line 27 def colors if defined?(@custom_colors) return @colors else return default_colors end end |
Instance Method Details
#items_per_page ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/upmin/configuration.rb', line 53 def items_per_page if defined?(@custom_items_per_page) return @items_per_page else return 30 end end |
#items_per_page=(items) ⇒ Object
48 49 50 51 |
# File 'lib/upmin/configuration.rb', line 48 def items_per_page=(items) @custom_items_per_page = true @items_per_page = items end |
#models ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/upmin/configuration.rb', line 40 def models if defined?(@custom_models) return @models else return default_models end end |
#models=(models) ⇒ Object
35 36 37 38 |
# File 'lib/upmin/configuration.rb', line 35 def models=(models) @custom_models = true @models = models end |