Class: CallCache::CachedCall

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(return_val, function_call, *parameters) ⇒ CachedCall

Returns a new instance of CachedCall.



26
27
28
29
30
31
# File 'lib/cached_call.rb', line 26

def initialize( return_val, function_call, *parameters )
    @created_at = Time.now
    @return_val = return_val
    @function_call = function_call
    @parameters = parameters
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



24
25
26
# File 'lib/cached_call.rb', line 24

def created_at
  @created_at
end

#function_callObject (readonly)

Returns the value of attribute function_call.



22
23
24
# File 'lib/cached_call.rb', line 22

def function_call
  @function_call
end

#parametersObject (readonly)

Returns the value of attribute parameters.



23
24
25
# File 'lib/cached_call.rb', line 23

def parameters
  @parameters
end

#return_valObject (readonly)

Returns the value of attribute return_val.



21
22
23
# File 'lib/cached_call.rb', line 21

def return_val
  @return_val
end

Instance Method Details

#idObject



33
34
35
# File 'lib/cached_call.rb', line 33

def id
    CallCache.get_id( @function_call, *@parameters)
end