Class: FFWD::Plugin::Loaded
- Inherits:
-
Object
- Object
- FFWD::Plugin::Loaded
- Defined in:
- lib/ffwd/plugin.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #can?(kind) ⇒ Boolean
- #capabilities ⇒ Object
- #get(kind) ⇒ Object
-
#initialize(source, name, config) ⇒ Loaded
constructor
A new instance of Loaded.
Constructor Details
#initialize(source, name, config) ⇒ Loaded
Returns a new instance of Loaded.
23 24 25 26 27 28 29 30 31 |
# File 'lib/ffwd/plugin.rb', line 23 def initialize source, name, config @source = source @name = name @mod = config[:mod] @description = config[:description] @options = config[:options] @setup_input_method = load_method @mod, config[:setup_input_method_name] @setup_output_method = load_method @mod, config[:setup_output_method_name] end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
21 22 23 |
# File 'lib/ffwd/plugin.rb', line 21 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
21 22 23 |
# File 'lib/ffwd/plugin.rb', line 21 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
21 22 23 |
# File 'lib/ffwd/plugin.rb', line 21 def @options end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
21 22 23 |
# File 'lib/ffwd/plugin.rb', line 21 def source @source end |
Instance Method Details
#can?(kind) ⇒ Boolean
47 48 49 |
# File 'lib/ffwd/plugin.rb', line 47 def can?(kind) not get(kind).nil? end |
#capabilities ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/ffwd/plugin.rb', line 33 def capabilities capabilities = [] if not @setup_input_method.nil? capabilities << "input" end if not @setup_output_method.nil? capabilities << "output" end return capabilities end |
#get(kind) ⇒ Object
51 52 53 54 55 |
# File 'lib/ffwd/plugin.rb', line 51 def get(kind) return @setup_input_method if kind == :input return @setup_output_method if kind == :output return nil end |