Class: YuiRestClient::FilterExtractor

Inherits:
Object
  • Object
show all
Defined in:
lib/yui_rest_client/filter_extractor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filter) ⇒ FilterExtractor

Returns a new instance of FilterExtractor.



7
8
9
10
11
# File 'lib/yui_rest_client/filter_extractor.rb', line 7

def initialize(filter)
  @full = build_filters(filter)
  @plain = @full.reject { |_, v| v.is_a? Regexp }
  @regex = @full.select { |_, v| v.is_a? Regexp }
end

Instance Attribute Details

#fullObject (readonly)

Returns the value of attribute full.



5
6
7
# File 'lib/yui_rest_client/filter_extractor.rb', line 5

def full
  @full
end

#plainObject (readonly)

Returns the value of attribute plain.



5
6
7
# File 'lib/yui_rest_client/filter_extractor.rb', line 5

def plain
  @plain
end

#regexObject (readonly)

Returns the value of attribute regex.



5
6
7
# File 'lib/yui_rest_client/filter_extractor.rb', line 5

def regex
  @regex
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/yui_rest_client/filter_extractor.rb', line 13

def to_s
  full.to_s
end