Class: Inferno::Entities::Message

Inherits:
Entity
  • Object
show all
Includes:
Attributes
Defined in:
lib/inferno/entities/message.rb

Overview

A ‘Message` represents a message generated during a test.

Constant Summary collapse

ATTRIBUTES =
[:id, :index, :message, :result_id, :result, :type].freeze
TYPES =
['error', 'warning', 'info'].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Attributes

included

Methods inherited from Entity

#to_hash

Constructor Details

#initialize(params) ⇒ Message

Returns a new instance of Message.



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

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

Instance Attribute Details

#idString

Returns id of the message.

Returns:

  • (String)

    id of the message



17
18
19
20
21
22
23
24
25
26
# File 'lib/inferno/entities/message.rb', line 17

class Message < Entity
  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
  TYPES = ['error', 'warning', 'info'].freeze

  include Inferno::Entities::Attributes

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

#indexString

Returns index of the message. Used for ordering.

Returns:

  • (String)

    index of the message. Used for ordering.



17
18
19
20
21
22
23
24
25
26
# File 'lib/inferno/entities/message.rb', line 17

class Message < Entity
  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
  TYPES = ['error', 'warning', 'info'].freeze

  include Inferno::Entities::Attributes

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

#messageString

Returns:

  • (String)


17
18
19
20
21
22
23
24
25
26
# File 'lib/inferno/entities/message.rb', line 17

class Message < Entity
  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
  TYPES = ['error', 'warning', 'info'].freeze

  include Inferno::Entities::Attributes

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

#resultInferno::Entities::Result



17
18
19
20
21
22
23
24
25
26
# File 'lib/inferno/entities/message.rb', line 17

class Message < Entity
  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
  TYPES = ['error', 'warning', 'info'].freeze

  include Inferno::Entities::Attributes

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

#result_idString

Returns:

  • (String)


17
18
19
20
21
22
23
24
25
26
# File 'lib/inferno/entities/message.rb', line 17

class Message < Entity
  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
  TYPES = ['error', 'warning', 'info'].freeze

  include Inferno::Entities::Attributes

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

#typeString

Returns:

  • (String)


17
18
19
20
21
22
23
24
25
26
# File 'lib/inferno/entities/message.rb', line 17

class Message < Entity
  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
  TYPES = ['error', 'warning', 'info'].freeze

  include Inferno::Entities::Attributes

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