Exception: Acter::InvalidSubject
- Inherits:
-
InvalidCommand
- Object
- StandardError
- Error
- InvalidCommand
- Acter::InvalidSubject
- Defined in:
- lib/acter/error.rb
Instance Attribute Summary
Attributes inherited from InvalidCommand
#action, #params, #schema, #subject
Instance Method Summary collapse
-
#initialize(subject, schema) ⇒ InvalidSubject
constructor
A new instance of InvalidSubject.
- #message ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(subject, schema) ⇒ InvalidSubject
Returns a new instance of InvalidSubject.
40 41 42 |
# File 'lib/acter/error.rb', line 40 def initialize(subject, schema) super(schema, subject) end |
Instance Method Details
#message ⇒ Object
43 44 45 |
# File 'lib/acter/error.rb', line 43 def "Invalid subject" end |
#to_s ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/acter/error.rb', line 46 def to_s if @subject.nil? || @subject == "help" "Command-line help" else "#{}: #{@subject.inspect}" end end |