Class: PreCommit::ErrorList
- Inherits:
-
Struct
- Object
- Struct
- PreCommit::ErrorList
- Defined in:
- lib/pre-commit/error_list.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(errors = []) ⇒ ErrorList
constructor
A new instance of ErrorList.
- #to_a ⇒ Object
- #to_s ⇒ Object
Constructor Details
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors
4 5 6 |
# File 'lib/pre-commit/error_list.rb', line 4 def errors @errors end |
Instance Method Details
#to_a ⇒ Object
14 15 16 |
# File 'lib/pre-commit/error_list.rb', line 14 def to_a errors.map(&:to_s) end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/pre-commit/error_list.rb', line 18 def to_s to_a.join("\n") end |