Sha256: 1648cea077a81ca12caaf68469b257819d122a545f88ea13c0c54e0951cde694

Contents?: true

Size: 372 Bytes

Versions: 10

Compression:

Stored size: 372 Bytes

Contents

require 'druid/locator_generator'

module Druid
  module ElementLocators

    def self.included(cls)
      Druid::LocatorGenerator.generate_locators(cls)
    end

    def element(tag, identifier={:index => 0})
      element_for(tag, identifier.clone)
    end

    private

    def locator(identifier)
      identifier[0] ? identifier[0] : {:index => 0}
    end

  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
druid-s-1.0.0 lib/druid/element_locators.rb
druid-ts-1.2.6 lib/druid/element_locators.rb
druid-ts-1.2.5 lib/druid/element_locators.rb
druid-ts-1.2.4 lib/druid/element_locators.rb
druid-ts-1.2.3 lib/druid/element_locators.rb
druid-ts-1.2.2 lib/druid/element_locators.rb
druid-ts-1.2.1 lib/druid/element_locators.rb
druid-ts-1.2.0 lib/druid/element_locators.rb
druid-ts-1.1.8 lib/druid/element_locators.rb
druid-ts-1.1.7 lib/druid/element_locators.rb