Class: CooCoo::Image::TransformChain
- Defined in:
- lib/coo-coo/image.rb
Instance Method Summary collapse
- #call(x, y) ⇒ Object
-
#initialize(first, second) ⇒ TransformChain
constructor
A new instance of TransformChain.
Methods inherited from Transform
Constructor Details
#initialize(first, second) ⇒ TransformChain
Returns a new instance of TransformChain.
148 149 150 151 |
# File 'lib/coo-coo/image.rb', line 148 def initialize(first, second) @first = first @second = second end |
Instance Method Details
#call(x, y) ⇒ Object
153 154 155 156 157 158 |
# File 'lib/coo-coo/image.rb', line 153 def call(x, y) p = @second.call(x, y) p2 = @first.call(*p) #puts("#{self.inspect} #{x} #{y} -> #{p} -> #{p2}") p2 end |