Module: Inazuma
- Defined in:
- lib/inazuma.rb,
lib/inazuma/config.rb,
lib/inazuma/version.rb,
lib/inazuma/paginatable_array.rb,
lib/inazuma/page_scope_methods.rb,
lib/inazuma/configuration_methods.rb
Defined Under Namespace
Modules: ConfigurationMethods, PageScopeMethods Classes: Configuration, PaginatableArray
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
-
.config ⇒ Object
Global settings for Inazuma.
-
.configure {|@config ||= Inazuma::Configuration.new| ... } ⇒ Object
Configures global settings for Inazuma Inazuma.configure do |config| config.default_per_page = 10 end.
-
.paginate_array(array, options = {}) ⇒ Object
Wrap an Array object to make it paginatable ==== Options *
:limit
- limit *:offset
- offset *:total_count
- total_count.
Class Method Details
.config ⇒ Object
Global settings for Inazuma
13 14 15 |
# File 'lib/inazuma/config.rb', line 13 def self.config @config end |
.configure {|@config ||= Inazuma::Configuration.new| ... } ⇒ Object
Configures global settings for Inazuma
Inazuma.configure do |config|
config.default_per_page = 10
end
8 9 10 |
# File 'lib/inazuma/config.rb', line 8 def self.configure(&block) yield @config ||= Inazuma::Configuration.new end |
.paginate_array(array, options = {}) ⇒ Object
Wrap an Array object to make it paginatable
Options
-
:limit
- limit -
:offset
- offset -
:total_count
- total_count
55 56 57 |
# File 'lib/inazuma/paginatable_array.rb', line 55 def self.paginate_array(array, = {}) PaginatableArray.new array, end |