Module: Gitlab::MarkdownCache::Redis::Extension
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/gitlab/markdown_cache/redis/extension.rb
Instance Attribute Summary collapse
-
#cached_markdown_version ⇒ Object
readonly
Returns the value of attribute cached_markdown_version.
Instance Method Summary collapse
Instance Attribute Details
#cached_markdown_version ⇒ Object (readonly)
Returns the value of attribute cached_markdown_version.
9 10 11 |
# File 'lib/gitlab/markdown_cache/redis/extension.rb', line 9 def cached_markdown_version @cached_markdown_version end |
Instance Method Details
#write_markdown_field(field_name, value) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/gitlab/markdown_cache/redis/extension.rb', line 37 def write_markdown_field(field_name, value) # The value read from redis is a string, so we're converting it back # to an int. value = value.to_i if field_name == :cached_markdown_version instance_variable_set("@#{field_name}", value) end |