waistband 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,9 +11,10 @@ module Waistband
11
11
  @index = index
12
12
  @page = (options[:page] || 1).to_i
13
13
  @page_size = (options[:page_size] || 20).to_i
14
+ prepare
14
15
  end
15
16
 
16
- def prepare(hash)
17
+ def prepare(hash = {})
17
18
  @hash = hash.with_indifferent_access
18
19
  self
19
20
  end
@@ -21,8 +22,6 @@ module Waistband
21
22
  private
22
23
 
23
24
  def to_hash
24
- raise "No query has been prepared yet!" unless @hash
25
-
26
25
  @hash[:from] = from unless @hash[:from]
27
26
  @hash[:size] = @page_size unless @hash[:size]
28
27
 
@@ -1,3 +1,3 @@
1
1
  module Waistband
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waistband
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: