Class: Axe::API::Selector
- Inherits:
-
Object
- Object
- Axe::API::Selector
- Defined in:
- lib/axe/api/selector.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(s) ⇒ Selector
constructor
A new instance of Selector.
- #to_a ⇒ Object
Constructor Details
#initialize(s) ⇒ Selector
Returns a new instance of Selector.
16 17 18 19 20 21 22 23 |
# File 'lib/axe/api/selector.rb', line 16 def initialize(s) @selector = case s when Array then s when String, Symbol then [String(s)] when Hash then Selector.new(s[:selector]).to_a.unshift s[:iframe] else Selector.new(s.selector).to_a.unshift s.iframe end end |
Class Method Details
Instance Method Details
#to_a ⇒ Object
25 26 27 |
# File 'lib/axe/api/selector.rb', line 25 def to_a @selector end |