Class: Inferno::Entities::SessionData

Inherits:
Entity
  • Object
show all
Defined in:
lib/inferno/entities/session_data.rb

Overview

SessionData represents a piece of saved state for a TestSession. These are used to store test inputs and outputs.

Constant Summary collapse

ATTRIBUTES =
[:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ SessionData

Returns a new instance of SessionData.



23
24
25
# File 'lib/inferno/entities/session_data.rb', line 23

def initialize(params)
  super(params, ATTRIBUTES)
end

Instance Attribute Details

#created_atTime

Returns:

  • (Time)


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/inferno/entities/session_data.rb', line 18

class SessionData < Entity
  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze

  include Inferno::Entities::Attributes

  def initialize(params)
    super(params, ATTRIBUTES)
  end

  def to_hash
    {
      id:,
      name:,
      value:,
      test_session_id:,
      created_at:,
      updated_at:
    }
  end
end

#idString

Returns id of the test input.

Returns:

  • (String)

    id of the test input



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/inferno/entities/session_data.rb', line 18

class SessionData < Entity
  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze

  include Inferno::Entities::Attributes

  def initialize(params)
    super(params, ATTRIBUTES)
  end

  def to_hash
    {
      id:,
      name:,
      value:,
      test_session_id:,
      created_at:,
      updated_at:
    }
  end
end

#nameString

Returns:

  • (String)


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/inferno/entities/session_data.rb', line 18

class SessionData < Entity
  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze

  include Inferno::Entities::Attributes

  def initialize(params)
    super(params, ATTRIBUTES)
  end

  def to_hash
    {
      id:,
      name:,
      value:,
      test_session_id:,
      created_at:,
      updated_at:
    }
  end
end

#test_session_idString

Returns:

  • (String)


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/inferno/entities/session_data.rb', line 18

class SessionData < Entity
  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze

  include Inferno::Entities::Attributes

  def initialize(params)
    super(params, ATTRIBUTES)
  end

  def to_hash
    {
      id:,
      name:,
      value:,
      test_session_id:,
      created_at:,
      updated_at:
    }
  end
end

#updated_atTime

Returns:

  • (Time)


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/inferno/entities/session_data.rb', line 18

class SessionData < Entity
  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze

  include Inferno::Entities::Attributes

  def initialize(params)
    super(params, ATTRIBUTES)
  end

  def to_hash
    {
      id:,
      name:,
      value:,
      test_session_id:,
      created_at:,
      updated_at:
    }
  end
end

#valueString

Returns:

  • (String)


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/inferno/entities/session_data.rb', line 18

class SessionData < Entity
  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze

  include Inferno::Entities::Attributes

  def initialize(params)
    super(params, ATTRIBUTES)
  end

  def to_hash
    {
      id:,
      name:,
      value:,
      test_session_id:,
      created_at:,
      updated_at:
    }
  end
end

Instance Method Details

#to_hashObject



27
28
29
30
31
32
33
34
35
36
# File 'lib/inferno/entities/session_data.rb', line 27

def to_hash
  {
    id:,
    name:,
    value:,
    test_session_id:,
    created_at:,
    updated_at:
  }
end