Module: Brauser::Queryable::Chainers
- Included in:
- Brauser::Query
- Defined in:
- lib/brauser/queryable/chainers.rb
Overview
Methods to chain queries.
Instance Method Summary collapse
-
#accepts(langs = []) ⇒ Query
Check if the browser accepts the specified languages.
-
#is(names = [], versions = {}, platforms = []) ⇒ Query
Checks if the browser is a specific name and optionally of a specific version and platform.
-
#on(platforms = []) ⇒ Query
Check if the browser is on a specific platform.
-
#version(versions = {}) ⇒ Query
(also: #v)
Checks if the browser is a specific version.
Instance Method Details
#accepts(langs = []) ⇒ Query
Check if the browser accepts the specified languages.
50 51 52 53 |
# File 'lib/brauser/queryable/chainers.rb', line 50 def accepts(langs = []) @result = accepts?(langs) self end |
#is(names = [], versions = {}, platforms = []) ⇒ Query
Checks if the browser is a specific name and optionally of a specific version and platform.
21 22 23 24 |
# File 'lib/brauser/queryable/chainers.rb', line 21 def is(names = [], versions = {}, platforms = []) @result = is?(names, versions, platforms) self end |
#on(platforms = []) ⇒ Query
Check if the browser is on a specific platform.
41 42 43 44 |
# File 'lib/brauser/queryable/chainers.rb', line 41 def on(platforms = []) @result = on?(platforms) self end |
#version(versions = {}) ⇒ Query Also known as: v
Checks if the browser is a specific version.
31 32 33 34 |
# File 'lib/brauser/queryable/chainers.rb', line 31 def version(versions = {}) @result = version?(versions) self end |