Class: HadoopDsl::BaseMapRed

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
DslController
Defined in:
lib/core.rb

Direct Known Subclasses

BaseMapper, BaseReducer

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DslController

#pre_process, #run

Methods included from DslElement

#method_missing

Constructor Details

#initialize(script, model) ⇒ BaseMapRed

Returns a new instance of BaseMapRed.



35
36
37
38
39
# File 'lib/core.rb', line 35

def initialize(script, model)
  @script, @model = script, model
  @model.controller = self
  @emitted = []
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class HadoopDsl::DslElement

Instance Attribute Details

#emittedObject (readonly)

Returns the value of attribute emitted.



33
34
35
# File 'lib/core.rb', line 33

def emitted
  @emitted
end

Instance Method Details

#emit(hash) ⇒ Object



41
# File 'lib/core.rb', line 41

def emit(hash) @emitted << hash end