class HrrRbNetconf::Server::Filter
Public Class Methods
[](key)
click to toggle source
# File lib/hrr_rb_netconf/server/filter.rb, line 14 def [] key __subclass_list__(__method__).find{ |klass| klass::TYPE == key } end
filter(raw_output_e, input_e)
click to toggle source
# File lib/hrr_rb_netconf/server/filter.rb, line 27 def filter raw_output_e, input_e filter_e = input_e.elements['filter'] if filter_e filter_type = filter_e.attributes['type'] || 'subtree' if self[filter_type] self[filter_type].filter raw_output_e, filter_e else raise Error['bad-attribute'].new('protocol', 'error', info: {'bad-attribute' => filter_type, 'bad-element' => 'filter'}) end else raw_output_e end end
inherited(klass)
click to toggle source
# File lib/hrr_rb_netconf/server/filter.rb, line 10 def inherited klass @subclass_list.push klass if @subclass_list end
list()
click to toggle source
# File lib/hrr_rb_netconf/server/filter.rb, line 18 def list __subclass_list__(__method__).map{ |klass| klass::TYPE } end
Private Class Methods
__subclass_list__(method_name)
click to toggle source
# File lib/hrr_rb_netconf/server/filter.rb, line 22 def __subclass_list__ method_name send(:method_missing, method_name) unless @subclass_list @subclass_list end