Module: Tablets::Global::Configurator
- Included in:
- Tablets
- Defined in:
- lib/tablets/global/configurator.rb
Overview
Responsible to make application configurable
Constant Summary collapse
- DEFAULT_OPTIONS =
{ pageLength: 15, processing: false, info: true, lengthChange: false, serverSide: true, pagingType: 'full_numbers', order: [0, 'asc'], autoWidth: true, orderCellsTop: true, serverMethod: 'POST', language: { lengthMenu: '<span class=\'seperator\'>|</span>View _MENU_ records', info: '<span class=\'seperator\'>|</span>Found total _TOTAL_ records', infoEmpty: '', emptyTable: 'No records found to show', zeroRecords: 'No matching records found', paginate: { previous: 'Prev', next: 'Next', last: 'Last', first: 'First', page: 'Page', pageOf: 'of' } } }
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#tablets_dir ⇒ Object
Returns the value of attribute tablets_dir.
Class Method Summary collapse
-
.extended(base) ⇒ Object
Initialize default config values.
Instance Method Summary collapse
-
#setup {|_self| ... } ⇒ Object
Setup configuration.
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
7 8 9 |
# File 'lib/tablets/global/configurator.rb', line 7 def @options end |
#tablets_dir ⇒ Object
Returns the value of attribute tablets_dir.
8 9 10 |
# File 'lib/tablets/global/configurator.rb', line 8 def tablets_dir @tablets_dir end |
Class Method Details
.extended(base) ⇒ Object
Initialize default config values
16 17 18 19 |
# File 'lib/tablets/global/configurator.rb', line 16 def self.extended(base) base. = DEFAULT_OPTIONS base.tablets_dir = File.('app/tablets', Rails.root) end |
Instance Method Details
#setup {|_self| ... } ⇒ Object
Setup configuration. Used in initializers
11 12 13 |
# File 'lib/tablets/global/configurator.rb', line 11 def setup yield self end |