Class: Datapipes::Basics::Triple

Inherits:
Tube
  • Object
show all
Defined in:
lib/datapipes/basics/triple.rb

Instance Method Summary collapse

Methods inherited from Tube

#run_all

Instance Method Details

#accept?(data) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/datapipes/basics/triple.rb', line 8

def accept?(data)
  data.is_a? Integer and data > 3
end

#run(data) ⇒ Object



4
5
6
# File 'lib/datapipes/basics/triple.rb', line 4

def run(data)
  [data, data, data]
end