Class: Media::Filter
- Inherits:
-
Object
- Object
- Media::Filter
- Defined in:
- lib/media/filter.rb,
lib/media/filter/chain.rb,
lib/media/filter/graph.rb,
lib/media/filter/argument.rb
Defined Under Namespace
Classes: Argument, Chain, Graph
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#inputs ⇒ Object
readonly
Returns the value of attribute inputs.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#outputs ⇒ Object
readonly
Returns the value of attribute outputs.
Instance Method Summary collapse
-
#initialize(args) ⇒ Filter
constructor
A new instance of Filter.
- #to_s ⇒ Object
Constructor Details
#initialize(args) ⇒ Filter
Returns a new instance of Filter.
12 13 14 15 16 17 |
# File 'lib/media/filter.rb', line 12 def initialize(args) @name = args.fetch(:name) @arguments = Array args.fetch(:arguments, []) @inputs = Array args.fetch(:inputs, []) @outputs = Array args.fetch(:outputs, []) end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
10 11 12 |
# File 'lib/media/filter.rb', line 10 def arguments @arguments end |
#inputs ⇒ Object (readonly)
Returns the value of attribute inputs.
10 11 12 |
# File 'lib/media/filter.rb', line 10 def inputs @inputs end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/media/filter.rb', line 10 def name @name end |
#outputs ⇒ Object (readonly)
Returns the value of attribute outputs.
10 11 12 |
# File 'lib/media/filter.rb', line 10 def outputs @outputs end |
Instance Method Details
#to_s ⇒ Object
19 20 21 |
# File 'lib/media/filter.rb', line 19 def to_s [inputs, filter, outputs].reject(&:empty?).join(' ') end |