Class: Vop::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/vop/objects/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result, context, timestamp = nil) ⇒ Response

Returns a new instance of Response.


8
9
10
11
12
13
# File 'lib/vop/objects/response.rb', line 8

def initialize(result, context, timestamp = nil)
  @result = result
  @context = context
  @timestamp = timestamp || Time.now
  @status = "ok"
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context


5
6
7
# File 'lib/vop/objects/response.rb', line 5

def context
  @context
end

#resultObject (readonly)

Returns the value of attribute result


5
6
7
# File 'lib/vop/objects/response.rb', line 5

def result
  @result
end

#statusObject

Returns the value of attribute status


6
7
8
# File 'lib/vop/objects/response.rb', line 6

def status
  @status
end

#timestampObject (readonly)

Returns the value of attribute timestamp


5
6
7
# File 'lib/vop/objects/response.rb', line 5

def timestamp
  @timestamp
end