Module: PluginAdapter::ClassMethods
- Defined in:
- lib/wiki_lyrics/cli/pluginadapter.rb,
lib/wiki_lyrics/amarok/pluginadapter.rb
Overview
Methods under this module will became class methods when the module gets included Note: don’t use def self.<method name> but just <method name>
Class Method Summary collapse
Instance Method Summary collapse
- #add_custom_checkeable_menu_item(menu_item, checked) ⇒ Object
- #add_custom_menu_item(menu_item) ⇒ Object
- #notify(message) ⇒ Object
- #plugin_name ⇒ Object
- #popup(message) ⇒ Object
- #remove_custom_checkeable_menu_item(menu_item) ⇒ Object
- #remove_custom_menu_item(menu_item) ⇒ Object
Class Method Details
.append_class_methods(mod) ⇒ Object
35 36 37 |
# File 'lib/wiki_lyrics/cli/pluginadapter.rb', line 35 def ClassMethods.append_class_methods( mod ) include mod::ClassMethods end |
Instance Method Details
#add_custom_checkeable_menu_item(menu_item, checked) ⇒ Object
61 62 63 |
# File 'lib/wiki_lyrics/amarok/pluginadapter.rb', line 61 def ( , checked ) Amarok.( plugin_name(), , checked ) end |
#add_custom_menu_item(menu_item) ⇒ Object
53 54 55 |
# File 'lib/wiki_lyrics/amarok/pluginadapter.rb', line 53 def ( ) Amarok.( plugin_name(), ) end |
#notify(message) ⇒ Object
43 44 45 |
# File 'lib/wiki_lyrics/cli/pluginadapter.rb', line 43 def notify( ) puts plugin_name() + ": " + .gsub( /\/?<[^>]+>/, "" ) end |
#plugin_name ⇒ Object
39 40 41 |
# File 'lib/wiki_lyrics/cli/pluginadapter.rb', line 39 def plugin_name() return site_name() end |
#popup(message) ⇒ Object
49 50 51 |
# File 'lib/wiki_lyrics/amarok/pluginadapter.rb', line 49 def popup( ) Amarok.popup( "<b>" + plugin_name() + "</b>:<br/>" + ) end |
#remove_custom_checkeable_menu_item(menu_item) ⇒ Object
65 66 67 |
# File 'lib/wiki_lyrics/amarok/pluginadapter.rb', line 65 def ( ) Amarok.( plugin_name(), ) end |
#remove_custom_menu_item(menu_item) ⇒ Object
57 58 59 |
# File 'lib/wiki_lyrics/amarok/pluginadapter.rb', line 57 def ( ) Amarok.( plugin_name(), ) end |