Class: Microsandbox::TouchResult

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

Overview

The result of Sandbox#touch / SandboxHandle#touch: an explicit refresh of the sandbox idle-activity timer. Mirrors the official SDKs' SandboxTouchResult.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ TouchResult

Returns a new instance of TouchResult.



39
40
41
42
# File 'lib/microsandbox/modification.rb', line 39

def initialize(data)
  @name = data["name"]
  @activity_seq = data["activity_seq"]
end

Instance Attribute Details

#activity_seqInteger (readonly)

Returns the agent activity sequence after this touch was recorded.

Returns:

  • (Integer)

    the agent activity sequence after this touch was recorded



37
38
39
# File 'lib/microsandbox/modification.rb', line 37

def activity_seq
  @activity_seq
end

#nameString (readonly)

Returns the sandbox name that was touched.

Returns:

  • (String)

    the sandbox name that was touched



35
36
37
# File 'lib/microsandbox/modification.rb', line 35

def name
  @name
end

Instance Method Details

#inspectObject



44
45
46
# File 'lib/microsandbox/modification.rb', line 44

def inspect
  "#<Microsandbox::TouchResult name=#{@name.inspect} activity_seq=#{@activity_seq}>"
end