Class: Lawyer::WrongArityViolation
- Inherits:
-
Object
- Object
- Lawyer::WrongArityViolation
- Defined in:
- lib/lawyer/wrong_arity_violation.rb
Instance Method Summary collapse
-
#initialize(name, expected: 0, actual: 0) ⇒ WrongArityViolation
constructor
A new instance of WrongArityViolation.
- #to_s ⇒ Object
Constructor Details
#initialize(name, expected: 0, actual: 0) ⇒ WrongArityViolation
Returns a new instance of WrongArityViolation.
3 4 5 6 7 |
# File 'lib/lawyer/wrong_arity_violation.rb', line 3 def initialize(name, expected: 0, actual: 0) @name = name @expected = expected @actual = actual end |
Instance Method Details
#to_s ⇒ Object
9 10 11 |
# File 'lib/lawyer/wrong_arity_violation.rb', line 9 def to_s "\t[wrong arity] #{@name} (takes #{@actual}, requires #{@expected})" end |