Class: Spigoter::Plugin
- Inherits:
-
Object
- Object
- Spigoter::Plugin
- Defined in:
- lib/spigoter/webapi/plugin.rb
Overview
Generalized plugin.
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
- #download_url ⇒ Object
- #file ⇒ Object
-
#initialize(website) ⇒ Plugin
constructor
A new instance of Plugin.
- #main_page ⇒ Object
Constructor Details
#initialize(website) ⇒ Plugin
Returns a new instance of Plugin.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/spigoter/webapi/plugin.rb', line 8 def initialize(website) @url = website # Url of the plugin # @main_page # Mainpage content # @name # Name of the plugin # @download_page # Content of the download page # @download_url # Download url of the plugin # @regexp # Regexp that matches the URL # @file # Where the file is stored main_page # preload main_page end |
Class Method Details
.list ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/spigoter/webapi/plugin.rb', line 33 def self.list { curse: Spigoter::PluginCurse, devbukkit: Spigoter::PluginBukkit, spigot: Spigoter::PluginSpigot } end |
Instance Method Details
#download_url ⇒ Object
24 25 26 |
# File 'lib/spigoter/webapi/plugin.rb', line 24 def download_url @url # Dummy method, just to test end |