Class: RegressyCommon::Capabilities::Capability
- Inherits:
-
Object
- Object
- RegressyCommon::Capabilities::Capability
- Defined in:
- lib/regressy_common/capabilities/capability.rb
Instance Attribute Summary collapse
-
#capability_name ⇒ Object
Returns the value of attribute capability_name.
-
#caps ⇒ Object
Returns the value of attribute caps.
Instance Method Summary collapse
-
#initialize(capability_name) ⇒ Capability
constructor
A new instance of Capability.
- #is_local? ⇒ Boolean
- #is_smartphone? ⇒ Boolean
Constructor Details
#initialize(capability_name) ⇒ Capability
Returns a new instance of Capability.
8 9 10 11 |
# File 'lib/regressy_common/capabilities/capability.rb', line 8 def initialize(capability_name) @capability_name = capability_name @caps = Capabilities.send(capability_name) end |
Instance Attribute Details
#capability_name ⇒ Object
Returns the value of attribute capability_name.
7 8 9 |
# File 'lib/regressy_common/capabilities/capability.rb', line 7 def capability_name @capability_name end |
#caps ⇒ Object
Returns the value of attribute caps.
7 8 9 |
# File 'lib/regressy_common/capabilities/capability.rb', line 7 def caps @caps end |
Instance Method Details
#is_local? ⇒ Boolean
13 14 15 |
# File 'lib/regressy_common/capabilities/capability.rb', line 13 def is_local? !@caps["local"].nil? end |
#is_smartphone? ⇒ Boolean
17 18 19 |
# File 'lib/regressy_common/capabilities/capability.rb', line 17 def is_smartphone? !@caps["platformName"].nil? end |