Class: Symbol
- Inherits:
-
Object
- Object
- Symbol
- Defined in:
- lib/core_ext/symbol.rb
Instance Method Summary collapse
- #to_camelized_s ⇒ Object
- #to_control_type ⇒ Object
- #to_control_type_const ⇒ Object
- #to_pattern_available_property ⇒ Object
-
#to_pattern_const ⇒ Object
:selection_item => Uia::Patterns::SelectionItem.
Instance Method Details
#to_camelized_s ⇒ Object
2 3 4 |
# File 'lib/core_ext/symbol.rb', line 2 def to_camelized_s self.to_s.split('_').map(&:capitalize).join(' ') end |
#to_control_type ⇒ Object
15 16 17 |
# File 'lib/core_ext/symbol.rb', line 15 def to_control_type Uia::ControlTypes.const_get_path "#{self.capitalize}" end |
#to_control_type_const ⇒ Object
19 20 21 22 23 |
# File 'lib/core_ext/symbol.rb', line 19 def to_control_type_const control_type = Uia::Library::Constants::ControlTypes[self] raise Uia::InvalidControlType.new(self) unless control_type control_type end |
#to_pattern_available_property ⇒ Object
6 7 8 |
# File 'lib/core_ext/symbol.rb', line 6 def to_pattern_available_property "Is#{self.to_camelized_s.delete(' ')}PatternAvailableProperty" end |