Class: RichMessage
- Inherits:
-
Object
- Object
- RichMessage
- Defined in:
- lib/au_ps_inferno/utils/rich_message_class.rb
Overview
A class to represent a rich message for the better and informative output
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#profile ⇒ Object
readonly
Returns the value of attribute profile.
-
#resource_type ⇒ Object
readonly
Returns the value of attribute resource_type.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(resource, message, profile, _idx, _ref) ⇒ RichMessage
constructor
A new instance of RichMessage.
Constructor Details
#initialize(resource, message, profile, _idx, _ref) ⇒ RichMessage
Returns a new instance of RichMessage.
9 10 11 12 13 14 15 |
# File 'lib/au_ps_inferno/utils/rich_message_class.rb', line 9 def initialize(resource, , profile, _idx, _ref) = ([:message], resource.resourceType, resource.id) @resource_type = resource.resourceType @message = @type = [:type] @profile = profile end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
7 8 9 |
# File 'lib/au_ps_inferno/utils/rich_message_class.rb', line 7 def @message end |
#profile ⇒ Object (readonly)
Returns the value of attribute profile.
7 8 9 |
# File 'lib/au_ps_inferno/utils/rich_message_class.rb', line 7 def profile @profile end |
#resource_type ⇒ Object (readonly)
Returns the value of attribute resource_type.
7 8 9 |
# File 'lib/au_ps_inferno/utils/rich_message_class.rb', line 7 def resource_type @resource_type end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/au_ps_inferno/utils/rich_message_class.rb', line 7 def type @type end |