Class: UiBibz::Ui::Ux::Store
- Inherits:
-
Object
- Object
- UiBibz::Ui::Ux::Store
- Defined in:
- lib/ui_bibz/ui/ux/table/components/store.rb
Instance Attribute Summary (collapse)
-
- (Object) records
Returns the value of attribute records.
Instance Method Summary (collapse)
- - (Object) action
- - (Object) columns
- - (Object) controller
- - (Object) current_page
- - (Object) direction
-
- (Store) initialize(store)
constructor
A new instance of Store.
- - (Object) limit_value
- - (Object) model
- - (Object) per_page
- - (Object) search
- - (Object) searchable_attributes
- - (Object) sort
- - (Object) total_entries
- - (Object) total_pages
Constructor Details
- (Store) initialize(store)
Returns a new instance of Store
8 9 10 11 12 |
# File 'lib/ui_bibz/ui/ux/table/components/store.rb', line 8 def initialize store @records = store.records @store = store @model = store.model end |
Instance Attribute Details
- (Object) records
Returns the value of attribute records
6 7 8 |
# File 'lib/ui_bibz/ui/ux/table/components/store.rb', line 6 def records @records end |
Instance Method Details
- (Object) action
62 63 64 |
# File 'lib/ui_bibz/ui/ux/table/components/store.rb', line 62 def action @store.action end |
- (Object) columns
46 47 48 |
# File 'lib/ui_bibz/ui/ux/table/components/store.rb', line 46 def columns @columns ||= Columns.new model.new.attributes.keys.map{ |record| Column.new(record.humanize, { data_index: record }) } end |
- (Object) controller
58 59 60 |
# File 'lib/ui_bibz/ui/ux/table/components/store.rb', line 58 def controller @store.controller end |
- (Object) current_page
38 39 40 |
# File 'lib/ui_bibz/ui/ux/table/components/store.rb', line 38 def current_page @records.current_page end |
- (Object) direction
30 31 32 |
# File 'lib/ui_bibz/ui/ux/table/components/store.rb', line 30 def direction @store.direction end |
- (Object) limit_value
42 43 44 |
# File 'lib/ui_bibz/ui/ux/table/components/store.rb', line 42 def limit_value @records.limit_value end |
- (Object) model
50 51 52 |
# File 'lib/ui_bibz/ui/ux/table/components/store.rb', line 50 def model @model end |
- (Object) per_page
18 19 20 |
# File 'lib/ui_bibz/ui/ux/table/components/store.rb', line 18 def per_page @records.per_page end |
- (Object) search
54 55 56 |
# File 'lib/ui_bibz/ui/ux/table/components/store.rb', line 54 def search @store.search end |
- (Object) searchable_attributes
34 35 36 |
# File 'lib/ui_bibz/ui/ux/table/components/store.rb', line 34 def searchable_attributes @store.searchable_attributes end |
- (Object) sort
26 27 28 |
# File 'lib/ui_bibz/ui/ux/table/components/store.rb', line 26 def sort @store.sort end |
- (Object) total_entries
22 23 24 |
# File 'lib/ui_bibz/ui/ux/table/components/store.rb', line 22 def total_entries @records.total_entries end |
- (Object) total_pages
14 15 16 |
# File 'lib/ui_bibz/ui/ux/table/components/store.rb', line 14 def total_pages @records.total_pages end |