lib/kredis/attributes.rb in kredis-1.0.1 vs lib/kredis/attributes.rb in kredis-1.1.0

- old
+ new

@@ -60,15 +60,19 @@ def kredis_slots(name, available:, key: nil, config: :shared, after_change: nil) kredis_connection_with __method__, name, key, available: available, config: config, after_change: after_change end - def kredis_counter(name, key: nil, config: :shared, after_change: nil) - kredis_connection_with __method__, name, key, config: config, after_change: after_change + def kredis_counter(name, key: nil, config: :shared, after_change: nil, expires_in: nil) + kredis_connection_with __method__, name, key, config: config, after_change: after_change, expires_in: expires_in end def kredis_hash(name, key: nil, typed: :string, config: :shared, after_change: nil) kredis_connection_with __method__, name, key, typed: typed, config: config, after_change: after_change + end + + def kredis_boolean(name, key: nil, config: :shared, after_change: nil, expires_in: nil) + kredis_connection_with __method__, name, key, config: config, after_change: after_change, expires_in: expires_in end private def kredis_connection_with(method, name, key, **options) ivar_symbol = :"@#{name}_#{method}"