lib/kredis/attributes.rb in kredis-0.3.1 vs lib/kredis/attributes.rb in kredis-0.4.0

- old
+ new

@@ -4,43 +4,43 @@ class_methods do def kredis_proxy(name, key: nil, config: :shared, after_change: nil) kredis_connection_with __method__, name, key, config: config, after_change: after_change end - def kredis_string(name, key: nil, config: :shared, after_change: nil) - kredis_connection_with __method__, name, key, config: config, after_change: after_change + def kredis_string(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_integer(name, key: nil, config: :shared, after_change: nil) - kredis_connection_with __method__, name, key, config: config, after_change: after_change + def kredis_integer(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_decimal(name, key: nil, config: :shared, after_change: nil) - kredis_connection_with __method__, name, key, config: config, after_change: after_change + def kredis_decimal(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_datetime(name, key: nil, config: :shared, after_change: nil) - kredis_connection_with __method__, name, key, config: config, after_change: after_change + def kredis_datetime(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_flag(name, key: nil, config: :shared, after_change: nil) kredis_connection_with __method__, name, key, config: config, after_change: after_change define_method("#{name}?") do send(name).marked? end end - def kredis_float(name, key: nil, config: :shared, after_change: nil) - kredis_connection_with __method__, name, key, config: config, after_change: after_change + def kredis_float(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_enum(name, key: nil, values:, default:, config: :shared, after_change: nil) kredis_connection_with __method__, name, key, values: values, default: default, config: config, after_change: after_change end - def kredis_json(name, key: nil, config: :shared, after_change: nil) - kredis_connection_with __method__, name, key, config: config, after_change: after_change + def kredis_json(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_list(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