Class: ActiveSupport::Cache::WriteOptions

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

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ WriteOptions

:nodoc:



1057
1058
1059
# File 'activesupport/lib/active_support/cache.rb', line 1057

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

Instance Method Details

#expires_atObject



1078
1079
1080
# File 'activesupport/lib/active_support/cache.rb', line 1078

def expires_at
  @options[:expires_at]
end

#expires_at=(expires_at) ⇒ Object



1082
1083
1084
1085
# File 'activesupport/lib/active_support/cache.rb', line 1082

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

#expires_inObject



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

def expires_in
  @options[:expires_in]
end

#expires_in=(expires_in) ⇒ Object



1073
1074
1075
1076
# File 'activesupport/lib/active_support/cache.rb', line 1073

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

#versionObject



1061
1062
1063
# File 'activesupport/lib/active_support/cache.rb', line 1061

def version
  @options[:version]
end

#version=(version) ⇒ Object



1065
1066
1067
# File 'activesupport/lib/active_support/cache.rb', line 1065

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