Parent

Scrubyt::CompoundExample

Represents a compund example

There are two types of string examples in scRUBYt! right now: the simple example and the compound example. The simple example is specified by a string, and a compound example is specified with :contains, :begins_with and :ends_with descriptors - which can be both regexps or strings

Constants

DESCRIPTORS

Attributes

descriptor_hash[RW]

Public Class Methods

compound_example?(hash) click to toggle source

Is the hash passed to this function a compound example descriptor hash? Need to decide this when parsing pattern parameters

# File lib/scrubyt/core/scraping/compound_example.rb, line 23
def self.compound_example?(hash)
  hash.each do |k,v|
    return false if !DESCRIPTORS.include? k
  end
  true
end# end of method
new(descriptor_hash) click to toggle source
# File lib/scrubyt/core/scraping/compound_example.rb, line 16
def initialize(descriptor_hash)
  @descriptor_hash = descriptor_hash
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.