Class: Mvn2::FilterTypes
- Inherits:
-
Object
- Object
- Mvn2::FilterTypes
- Extended by:
- PluginType, TypeHelper
- Defined in:
- lib/mvn2/plugin.rb
Class Method Summary collapse
Class Method Details
.def_filter ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/mvn2/plugin.rb', line 63 def self.def_filter register_type(:line_filter) { |list, line| = Plugins.get_var :options line = line.chomp result = nil begin list.sort_by { |v| -v[:options][:priority] }.each { |item| tmp = item[:block].call(, line) unless tmp.nil? result = tmp || nil break end } rescue result = line end result } end |