Class: ActiveSupport::Cache::WriteOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/active_support/cache.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ WriteOptions

:nodoc:



1068
1069
1070
# File 'lib/active_support/cache.rb', line 1068

def initialize(options) # :nodoc:
  @options = options
end

Instance Method Details

#expires_atObject



1089
1090
1091
# File 'lib/active_support/cache.rb', line 1089

def expires_at
  @options[:expires_at]
end

#expires_at=(expires_at) ⇒ Object



1093
1094
1095
1096
# File 'lib/active_support/cache.rb', line 1093

def expires_at=(expires_at)
  @options.delete(:expires_in)
  @options[:expires_at] = expires_at
end

#expires_inObject



1080
1081
1082
# File 'lib/active_support/cache.rb', line 1080

def expires_in
  @options[:expires_in]
end

#expires_in=(expires_in) ⇒ Object



1084
1085
1086
1087
# File 'lib/active_support/cache.rb', line 1084

def expires_in=(expires_in)
  @options.delete(:expires_at)
  @options[:expires_in] = expires_in
end

#versionObject



1072
1073
1074
# File 'lib/active_support/cache.rb', line 1072

def version
  @options[:version]
end

#version=(version) ⇒ Object



1076
1077
1078
# File 'lib/active_support/cache.rb', line 1076

def version=(version)
  @options[:version] = version
end