Module: Andromeda::Kit::Transf

Included in:
Gatherer
Defined in:
lib/andromeda/kit.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#filterObject

Returns the value of attribute filter.



6
7
8
# File 'lib/andromeda/kit.rb', line 6

def filter
  @filter
end

#mapperObject

Returns the value of attribute mapper.



7
8
9
# File 'lib/andromeda/kit.rb', line 7

def mapper
  @mapper
end

Instance Method Details

#deliver_data(name, meth, key, val, tags_in) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/andromeda/kit.rb', line 9

def deliver_data(name, meth, key, val, tags_in)
	if signal_name?(name)
		super name, meth, key, val, tags_in
	else
		filter_ = filter
		mapper_ = mapper
		if !(filter_ && filter_.call(val))
			super name, meth, key, (if mapper_ then mapper_.call(val) else val end), tags_in
		end
	end
end