Class: Crowbar::Client::Filter::Subset

Inherits:
Base
  • Object
show all
Defined in:
lib/crowbar/client/filter/subset.rb

Overview

Filter to reduce a hash subset by a given search clause

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#initialize, #result

Constructor Details

This class inherits a constructor from Crowbar::Client::Filter::Base

Instance Method Details

#processObject



24
25
26
27
28
29
30
31
# File 'lib/crowbar/client/filter/subset.rb', line 24

def process
  options[:filter].to_s.split(".").each do |segment|
    segment = segment.to_i if segment.to_i.to_s == segment
    options[:values] = subset(segment)
  end

  options[:values]
end