Class: YuiRestClient::FilterExtractor
- Inherits:
-
Object
- Object
- YuiRestClient::FilterExtractor
- Defined in:
- lib/yui_rest_client/filter_extractor.rb
Instance Attribute Summary collapse
-
#full ⇒ Object
readonly
Returns the value of attribute full.
-
#plain ⇒ Object
readonly
Returns the value of attribute plain.
-
#regex ⇒ Object
readonly
Returns the value of attribute regex.
Instance Method Summary collapse
-
#initialize(filter) ⇒ FilterExtractor
constructor
A new instance of FilterExtractor.
- #to_s ⇒ Object
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
#full ⇒ Object (readonly)
Returns the value of attribute full.
5 6 7 |
# File 'lib/yui_rest_client/filter_extractor.rb', line 5 def full @full end |
#plain ⇒ Object (readonly)
Returns the value of attribute plain.
5 6 7 |
# File 'lib/yui_rest_client/filter_extractor.rb', line 5 def plain @plain end |
#regex ⇒ Object (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_s ⇒ Object
13 14 15 |
# File 'lib/yui_rest_client/filter_extractor.rb', line 13 def to_s full.to_s end |