Module: Grably::Core::TaskExtensions::Bucket

Included in:
Grably::Core::TaskExtensions
Defined in:
lib/grably/core/task/bucket.rb

Overview

# Bucket Bucket keeps result of task execution

Instance Method Summary collapse

Instance Method Details

#<<(product_expr) ⇒ Task

Updates bucket with result of argument expand

Parameters:

  • product_expr

Returns:

See Also:

  • Grably::Core::TaskExtensions::Bucket.[Grably[Grably::Core[Grably::Core::ProductExpand]


11
12
13
14
15
16
17
# File 'lib/grably/core/task/bucket.rb', line 11

def <<(product_expr)
  expand = Product.expand(product_expr, self)
  ensure_bucket
  @bucket += expand

  self # Allow chaining calls like
end

#bucketObject



19
20
21
# File 'lib/grably/core/task/bucket.rb', line 19

def bucket
  ensure_bucket
end

#ensure_bucketObject



23
24
25
# File 'lib/grably/core/task/bucket.rb', line 23

def ensure_bucket
  @bucket ||= []
end