Class: Myra::Violation
- Inherits:
-
Object
- Object
- Myra::Violation
- Defined in:
- lib/myra/objects/violation.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#property ⇒ Object
readonly
Returns the value of attribute property.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(property, message) ⇒ Violation
constructor
A new instance of Violation.
Constructor Details
#initialize(property, message) ⇒ Violation
Returns a new instance of Violation.
6 7 8 9 |
# File 'lib/myra/objects/violation.rb', line 6 def initialize(property, ) @property = property = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/myra/objects/violation.rb', line 4 def end |
#property ⇒ Object (readonly)
Returns the value of attribute property.
4 5 6 |
# File 'lib/myra/objects/violation.rb', line 4 def property @property end |
Class Method Details
.from_hash(violation) ⇒ Object
11 12 13 |
# File 'lib/myra/objects/violation.rb', line 11 def self.from_hash(violation) new(violation['propertyPath'], violation['message']) end |