Class: Transproc::Composer::Factory Private

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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



50
51
52
53
# File 'lib/transproc/composer.rb', line 50

def initialize(default = nil)
  @fns = []
  @default = default
end

Instance Attribute Details

#defaultObject (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.



47
48
49
# File 'lib/transproc/composer.rb', line 47

def default
  @default
end

#fnsObject (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.



47
48
49
# File 'lib/transproc/composer.rb', line 47

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.



56
57
58
59
# File 'lib/transproc/composer.rb', line 56

def <<(other)
  fns.concat(Array(other).compact)
  self
end

#t(*args, &block) ⇒ Object

Deprecated.


68
69
70
# File 'lib/transproc/composer.rb', line 68

def t(*args, &block)
  Transproc(*args, &block)
end

#to_fnObject

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.



62
63
64
# File 'lib/transproc/composer.rb', line 62

def to_fn
  fns.reduce(:+) || default
end