Module: Pipe

Defined in:
lib/pipe.rb,
lib/pipe/config.rb,
lib/pipe/reducer.rb,
lib/pipe/version.rb,
lib/pipe/iterator.rb,
lib/pipe/ext/string.rb,
lib/pipe/ext/inflection.rb

Defined Under Namespace

Modules: Ext Classes: Config, Iterator, Reducer

Constant Summary collapse

VERSION =
"1.0.2"

Instance Method Summary collapse

Instance Method Details

#pipe(subject, config: pipe_config, through: []) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/pipe.rb', line 7

def pipe(subject, config: pipe_config, through: [])
  ::Pipe::Reducer.new(
    :config => config,
    :context => self,
    :subject => subject,
    :through => through
  ).reduce
end

#pipe_each(subjects, config: pipe_config, through: []) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/pipe.rb', line 16

def pipe_each(subjects, config: pipe_config, through: [])
  ::Pipe::Iterator.new(
    :config => config,
    :context => self,
    :subjects => subjects,
    :through => through
  ).iterate
end