Class: CqlRuby::FilterReader
- Inherits:
-
Object
- Object
- CqlRuby::FilterReader
- Defined in:
- lib/cql_ruby/filter_reader.rb
Overview
Reads and provides filters.
Accepted filters and syntax:
Type:
type:(,[name])* example: type:def,send
Instance Attribute Summary collapse
-
#allowed_types ⇒ Object
readonly
Returns the value of attribute allowed_types.
-
#nest_under ⇒ Object
readonly
Returns the value of attribute nest_under.
Instance Method Summary collapse
-
#initialize(raw_filters) ⇒ FilterReader
constructor
A new instance of FilterReader.
- #restrict_nesting? ⇒ Boolean
- #restrict_types? ⇒ Boolean
Constructor Details
#initialize(raw_filters) ⇒ FilterReader
Returns a new instance of FilterReader.
46 47 48 49 50 51 52 53 |
# File 'lib/cql_ruby/filter_reader.rb', line 46 def initialize(raw_filters) super() @allowed_types = [] @nest_under = [] parse_raw_filters(raw_filters) end |
Instance Attribute Details
#allowed_types ⇒ Object (readonly)
Returns the value of attribute allowed_types.
42 43 44 |
# File 'lib/cql_ruby/filter_reader.rb', line 42 def allowed_types @allowed_types end |
#nest_under ⇒ Object (readonly)
Returns the value of attribute nest_under.
44 45 46 |
# File 'lib/cql_ruby/filter_reader.rb', line 44 def nest_under @nest_under end |
Instance Method Details
#restrict_nesting? ⇒ Boolean
59 60 61 |
# File 'lib/cql_ruby/filter_reader.rb', line 59 def restrict_nesting? !@nest_under.empty? end |
#restrict_types? ⇒ Boolean
55 56 57 |
# File 'lib/cql_ruby/filter_reader.rb', line 55 def restrict_types? !@allowed_types.empty? end |