Class: Preflight::Issue
- Inherits:
-
Object
- Object
- Preflight::Issue
- Defined in:
- lib/preflight/issue.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#rule ⇒ Object
readonly
Returns the value of attribute rule.
Instance Method Summary collapse
-
#initialize(description, rule, attributes = {}) ⇒ Issue
constructor
A new instance of Issue.
- #to_s ⇒ Object
Constructor Details
#initialize(description, rule, attributes = {}) ⇒ Issue
Returns a new instance of Issue.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/preflight/issue.rb', line 8 def initialize(description, rule, attributes = {}) @description = description if rule.is_a?(Class) @rule = rule.to_s.to_sym else @rule = rule.class.to_s.to_sym end @attributes = attributes || {} attach_attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
6 7 8 |
# File 'lib/preflight/issue.rb', line 6 def attributes @attributes end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/preflight/issue.rb', line 6 def description @description end |
#rule ⇒ Object (readonly)
Returns the value of attribute rule.
6 7 8 |
# File 'lib/preflight/issue.rb', line 6 def rule @rule end |
Instance Method Details
#to_s ⇒ Object
20 21 22 |
# File 'lib/preflight/issue.rb', line 20 def to_s @description end |