Class: RegressyCommon::Capabilities::Capability

Inherits:
Object
  • Object
show all
Defined in:
lib/regressy_common/capabilities/capability.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject

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

#capsObject

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

Returns:

  • (Boolean)


13
14
15
# File 'lib/regressy_common/capabilities/capability.rb', line 13

def is_local?
  !@caps["local"].nil?
end

#is_smartphone?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/regressy_common/capabilities/capability.rb', line 17

def is_smartphone?
  !@caps["platformName"].nil?
end