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:



884
885
886
# File 'activesupport/lib/active_support/cache.rb', line 884

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

Instance Method Details

#expires_atObject



905
906
907
# File 'activesupport/lib/active_support/cache.rb', line 905

def expires_at
  @options[:expires_at]
end

#expires_at=(expires_at) ⇒ Object



909
910
911
912
# File 'activesupport/lib/active_support/cache.rb', line 909

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

#expires_inObject



896
897
898
# File 'activesupport/lib/active_support/cache.rb', line 896

def expires_in
  @options[:expires_in]
end

#expires_in=(expires_in) ⇒ Object



900
901
902
903
# File 'activesupport/lib/active_support/cache.rb', line 900

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

#versionObject



888
889
890
# File 'activesupport/lib/active_support/cache.rb', line 888

def version
  @options[:version]
end

#version=(version) ⇒ Object



892
893
894
# File 'activesupport/lib/active_support/cache.rb', line 892

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