Class: Transproc::Composer::Factory Private
- Inherits:
-
Object
- Object
- Transproc::Composer::Factory
- Defined in:
- lib/transproc/composer.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #default ⇒ Object readonly private
- #fns ⇒ Object readonly private
Instance Method Summary collapse
- #<<(other) ⇒ Object private
-
#initialize(default = nil) ⇒ Factory
constructor
private
A new instance of Factory.
- #t(*args, &block) ⇒ Object deprecated Deprecated.
- #to_fn ⇒ Object private
Constructor Details
#initialize(default = nil) ⇒ Factory
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Factory.
26 27 28 29 |
# File 'lib/transproc/composer.rb', line 26 def initialize(default = nil) @fns = [] @default = default end |
Instance Attribute Details
#default ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/transproc/composer.rb', line 23 def default @default end |
#fns ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/transproc/composer.rb', line 23 def fns @fns end |
Instance Method Details
#<<(other) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 35 |
# File 'lib/transproc/composer.rb', line 32 def <<(other) fns.concat(Array(other).compact) self end |
#t(*args, &block) ⇒ Object
44 45 46 |
# File 'lib/transproc/composer.rb', line 44 def t(*args, &block) Transproc(*args, &block) end |
#to_fn ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
38 39 40 |
# File 'lib/transproc/composer.rb', line 38 def to_fn fns.reduce(:+) || default end |