Sha256: 22ac6fe8d42b66a134f7f0e447a071f437f1448d3a4b1123c0a11c82771de0c4

Contents?: true

Size: 753 Bytes

Versions: 7

Compression:

Stored size: 753 Bytes

Contents

require "testable/situation"

module Testable
  module Pages
    module Attribute
      include Situation

      def url_is(url = nil)
        url_is_empty if url.nil? && url_attribute.nil?
        url_is_empty if url.nil? || url.empty?
        @url = url
      end

      def url_attribute
        @url
      end

      def url_matches(pattern = nil)
        url_match_is_empty if pattern.nil?
        url_match_is_empty if pattern.is_a?(String) && pattern.empty?
        @url_match = pattern
      end

      def url_match_attribute
        @url_match
      end

      def title_is(title = nil)
        title_is_empty if title.nil? || title.empty?
        @title = title
      end

      def title_attribute
        @title
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
testable-0.10.0 lib/testable/attribute.rb
testable-0.9.0 lib/testable/attribute.rb
testable-0.8.0 lib/testable/attribute.rb
testable-0.7.0 lib/testable/attribute.rb
testable-0.6.0 lib/testable/attribute.rb
testable-0.5.0 lib/testable/attribute.rb
testable-0.4.0 lib/testable/attribute.rb