Class: ArtirixCacheService::Key

Inherits:
Object
  • Object
show all
Defined in:
lib/artirix_cache_service/key.rb

Constant Summary collapse

KEY_SEPARATOR =
'/'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(given_args, service) ⇒ Key

Returns a new instance of Key.



7
8
9
10
# File 'lib/artirix_cache_service/key.rb', line 7

def initialize(given_args, service)
  @service = service
  @args    = clean_key_args given_args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



5
6
7
# File 'lib/artirix_cache_service/key.rb', line 5

def args
  @args
end

#serviceObject (readonly)

Returns the value of attribute service.



5
6
7
# File 'lib/artirix_cache_service/key.rb', line 5

def service
  @service
end

Instance Method Details

#callObject



14
15
16
# File 'lib/artirix_cache_service/key.rb', line 14

def call
  clean_parts.join KEY_SEPARATOR
end