Class: Media::Filter::Graph
- Inherits:
-
Object
- Object
- Media::Filter::Graph
- Defined in:
- lib/media/filter/graph.rb
Instance Attribute Summary collapse
-
#chains ⇒ Object
readonly
Returns the value of attribute chains.
Instance Method Summary collapse
- #add_chain(&block) ⇒ Object (also: #chain)
-
#initialize(args = {}, &block) ⇒ Graph
constructor
A new instance of Graph.
- #to_s ⇒ Object
Constructor Details
#initialize(args = {}, &block) ⇒ Graph
Returns a new instance of Graph.
8 9 10 11 12 |
# File 'lib/media/filter/graph.rb', line 8 def initialize(args={}, &block) @chains = args.fetch(:chains, []) block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given? end |
Instance Attribute Details
#chains ⇒ Object (readonly)
Returns the value of attribute chains.
6 7 8 |
# File 'lib/media/filter/graph.rb', line 6 def chains @chains end |