Class: Cadenya::Types::Notice
- Inherits:
-
Object
- Object
- Cadenya::Types::Notice
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#level ⇒ Object
readonly
Returns the value of attribute level.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(level: nil, message: nil, key: nil) ⇒ Notice
constructor
A new instance of Notice.
- #to_h ⇒ Object
Constructor Details
#initialize(level: nil, message: nil, key: nil) ⇒ Notice
Returns a new instance of Notice.
3456 3457 3458 3459 3460 |
# File 'lib/cadenya/types.rb', line 3456 def initialize(level: nil, message: nil, key: nil) @level = level @message = @key = key end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
3454 3455 3456 |
# File 'lib/cadenya/types.rb', line 3454 def key @key end |
#level ⇒ Object (readonly)
Returns the value of attribute level.
3454 3455 3456 |
# File 'lib/cadenya/types.rb', line 3454 def level @level end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3454 3455 3456 |
# File 'lib/cadenya/types.rb', line 3454 def @message end |
Class Method Details
.from_json(data) ⇒ Object
3462 3463 3464 3465 3466 3467 3468 |
# File 'lib/cadenya/types.rb', line 3462 def self.from_json(data) new( level: data["level"], message: data["message"], key: data["key"], ) end |