Class: AdobeConnectApi::FilterDefinition::Field
- Inherits:
-
Object
- Object
- AdobeConnectApi::FilterDefinition::Field
- Defined in:
- lib/adobe_connect_api/filter_definition.rb
Instance Method Summary collapse
- #<(value) ⇒ Object
- #<=(value) ⇒ Object
- #==(value) ⇒ Object
- #>(value) ⇒ Object
- #>=(value) ⇒ Object
- #excluding(value) ⇒ Object
- #greater_than(value) ⇒ Object
- #greater_than_or_equals(value) ⇒ Object
-
#initialize(name) ⇒ Field
constructor
A new instance of Field.
- #lesser_than(value) ⇒ Object
- #lesser_than_or_equals(value) ⇒ Object
- #like(value) ⇒ Object
- #matches(value) ⇒ Object
- #query ⇒ Object
Constructor Details
#initialize(name) ⇒ Field
Returns a new instance of Field.
97 98 99 |
# File 'lib/adobe_connect_api/filter_definition.rb', line 97 def initialize (name) @name = name end |
Instance Method Details
#<(value) ⇒ Object
85 86 87 |
# File 'lib/adobe_connect_api/filter_definition.rb', line 85 def < (value) @lesser_than = value end |
#<=(value) ⇒ Object
93 94 95 |
# File 'lib/adobe_connect_api/filter_definition.rb', line 93 def <= (value) @lesser_than_or_equals = value end |
#==(value) ⇒ Object
77 78 79 |
# File 'lib/adobe_connect_api/filter_definition.rb', line 77 def == (value) @matches = value end |
#>(value) ⇒ Object
81 82 83 |
# File 'lib/adobe_connect_api/filter_definition.rb', line 81 def > (value) @greater_than = value end |
#>=(value) ⇒ Object
89 90 91 |
# File 'lib/adobe_connect_api/filter_definition.rb', line 89 def >= (value) @greater_than_or_equals = value end |
#excluding(value) ⇒ Object
73 74 75 |
# File 'lib/adobe_connect_api/filter_definition.rb', line 73 def excluding (value) @excluding = value end |
#greater_than(value) ⇒ Object
53 54 55 |
# File 'lib/adobe_connect_api/filter_definition.rb', line 53 def greater_than (value) @greater_than = value end |
#greater_than_or_equals(value) ⇒ Object
65 66 67 |
# File 'lib/adobe_connect_api/filter_definition.rb', line 65 def greater_than_or_equals (value) @greater_than_or_equals = value end |
#lesser_than(value) ⇒ Object
57 58 59 |
# File 'lib/adobe_connect_api/filter_definition.rb', line 57 def lesser_than (value) @lesser_than = value end |
#lesser_than_or_equals(value) ⇒ Object
69 70 71 |
# File 'lib/adobe_connect_api/filter_definition.rb', line 69 def lesser_than_or_equals (value) @lesser_than_or_equals = value end |
#like(value) ⇒ Object
61 62 63 |
# File 'lib/adobe_connect_api/filter_definition.rb', line 61 def like (value) @like = value end |
#matches(value) ⇒ Object
49 50 51 |
# File 'lib/adobe_connect_api/filter_definition.rb', line 49 def matches (value) @matches = value end |
#query ⇒ Object
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/adobe_connect_api/filter_definition.rb', line 101 def query query = "" if @matches != nil query += "&filter-" + @name + "=" + CGI.escape("#{@matches}") end if @greater_than != nil query += "&filter-gt-" + @name + "=" + CGI.escape("#{@greater_than}") end if @lesser_than != nil query += "&filter-lt-" + @name + "=" + CGI.escape("#{@lesser_than}") end if @like != nil query += "&filter-like-" + @name + "=" + CGI.escape("#{@like}") end if @greater_than_or_equals != nil query += "&filter-gte-" + @name + "=" + CGI.escape("#{@greater_than_or_equals}") end if @lesser_than_or_equals != nil query += "&filter-lte-" + @name + "=" + CGI.escape("#{@lesser_than_or_equals}") end if @excluding != nil query += "&filter-out-" + @name + "=" + CGI.escape("#{@excluding}") end return query end |