Exception: MPlayer::Error::BadCall
- Inherits:
-
MPlayerError
- Object
- RuntimeError
- MPlayerError
- MPlayer::Error::BadCall
- Defined in:
- lib/easy_mplayer/errors.rb
Overview
an error in sending a command to mplayer over its slave-mode API
Direct Known Subclasses
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
Instance Method Summary collapse
-
#called_as ⇒ Object
a type-prototype of how we attempted the mplayer API call.
-
#initialize(command, called_args) ⇒ BadCall
constructor
A new instance of BadCall.
- #to_s ⇒ Object
Constructor Details
#initialize(command, called_args) ⇒ BadCall
Returns a new instance of BadCall.
73 74 75 76 77 |
# File 'lib/easy_mplayer/errors.rb', line 73 def initialize(command, called_args) @cmd = command @args = called_args super(to_s) end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
60 61 62 |
# File 'lib/easy_mplayer/errors.rb', line 60 def args @args end |
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
60 61 62 |
# File 'lib/easy_mplayer/errors.rb', line 60 def cmd @cmd end |
Instance Method Details
#called_as ⇒ Object
a type-prototype of how we attempted the mplayer API call
63 64 65 66 67 |
# File 'lib/easy_mplayer/errors.rb', line 63 def called_as "#{cmd}(" + args.map do |x| x.class end.join(", ") + ")" end |
#to_s ⇒ Object
69 70 71 |
# File 'lib/easy_mplayer/errors.rb', line 69 def to_s "\nBad MPlayer call: #{called_as}" end |