Class: WillPaginate::Deprecation::Hash
- Inherits:
-
Hash
- Object
- Hash
- WillPaginate::Deprecation::Hash
- Defined in:
- lib/will_paginate/deprecation.rb
Instance Method Summary (collapse)
- - (Object) []=(key, value)
- - (Object) deprecate_key(*keys)
-
- (Hash) initialize(values = {})
constructor
A new instance of Hash.
- - (Object) merge(another)
- - (Object) to_hash
Constructor Details
- (Hash) initialize(values = {})
A new instance of Hash
23 24 25 26 27 |
# File 'lib/will_paginate/deprecation.rb', line 23 def initialize(values = {}) super() update values @deprecated = {} end |
Instance Method Details
- (Object) []=(key, value)
29 30 31 32 |
# File 'lib/will_paginate/deprecation.rb', line 29 def []=(key, value) check_deprecated(key, value) super end |
- (Object) deprecate_key(*keys)
34 35 36 37 |
# File 'lib/will_paginate/deprecation.rb', line 34 def deprecate_key(*keys) = block_given? ? Proc.new : keys.pop Array(keys).each { |key| @deprecated[key] = } end |
- (Object) merge(another)
39 40 41 |
# File 'lib/will_paginate/deprecation.rb', line 39 def merge(another) to_hash.update(another) end |
- (Object) to_hash
43 44 45 |
# File 'lib/will_paginate/deprecation.rb', line 43 def to_hash ::Hash.new.update(self) end |