Module: Songbirdsh::Command
- Included in:
- Enqueue, Flush, List, Recent, Reload, Restart, Scrobbling, Search, SetupScrobbling, ShowProperties, Shuffle, Start, Status, Stop
- Defined in:
- lib/songbirdsh/command.rb
Defined Under Namespace
Modules: ClassMethods Classes: Enqueue, Flush, List, Recent, Reload, Restart, Scrobbling, Search, SetupScrobbling, ShowProperties, Shuffle, Start, Status, Stop
Instance Attribute Summary collapse
-
#help ⇒ Object
readonly
Returns the value of attribute help.
-
#usage ⇒ Object
readonly
Returns the value of attribute usage.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#help ⇒ Object (readonly)
Returns the value of attribute help.
3 4 5 |
# File 'lib/songbirdsh/command.rb', line 3 def help @help end |
#usage ⇒ Object (readonly)
Returns the value of attribute usage.
3 4 5 |
# File 'lib/songbirdsh/command.rb', line 3 def usage @usage end |
Class Method Details
.included(cls) ⇒ Object
5 6 7 |
# File 'lib/songbirdsh/command.rb', line 5 def self.included cls cls.extend ClassMethods end |
.load(name, *args) ⇒ Object
9 10 11 12 13 |
# File 'lib/songbirdsh/command.rb', line 9 def self.load name, *args require "songbirdsh/command/#{name}" classname = name.to_s.split('_').map{|s|s.capitalize}.join Songbirdsh::Command.const_get(classname).new *args end |
Instance Method Details
#initialize(player) ⇒ Object
15 16 17 18 19 |
# File 'lib/songbirdsh/command.rb', line 15 def initialize player @player = player @usage = '' @help = '' end |