Class: Hitnmiss::Entity

Inherits:
Object
  • Object
show all
Defined in:
lib/hitnmiss/entity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, expiration: nil, fingerprint: nil, last_modified: nil) ⇒ Entity



5
6
7
8
9
10
# File 'lib/hitnmiss/entity.rb', line 5

def initialize(value, expiration: nil, fingerprint: nil, last_modified: nil)
  @value = value
  @expiration = expiration
  @fingerprint = fingerprint
  @last_modified = last_modified
end

Instance Attribute Details

#expirationObject (readonly)

Returns the value of attribute expiration.



3
4
5
# File 'lib/hitnmiss/entity.rb', line 3

def expiration
  @expiration
end

#fingerprintObject (readonly)

Returns the value of attribute fingerprint.



3
4
5
# File 'lib/hitnmiss/entity.rb', line 3

def fingerprint
  @fingerprint
end

#last_modifiedObject (readonly)

Returns the value of attribute last_modified.



3
4
5
# File 'lib/hitnmiss/entity.rb', line 3

def last_modified
  @last_modified
end

#valueObject (readonly)

Returns the value of attribute value.



3
4
5
# File 'lib/hitnmiss/entity.rb', line 3

def value
  @value
end