Sha256: 95305f62d01ac9b4a1271e80f37099a2070d0b18de16168da62780f59fdd4609

Contents?: true

Size: 802 Bytes

Versions: 19

Compression:

Stored size: 802 Bytes

Contents

module CukeModeler

  # A class modeling an element of a Cucumber suite.

  class Model

    include Nested
    include Containing


    # Creates a new Model object and, if *source_text* is provided,
    # populates the object.
    def initialize(source_text = nil)
      raise(ArgumentError, "Can only create models from Strings but was given a #{source_text.class}.") if source_text && !source_text.is_a?(String)

      # This should be overridden by a child class
    end

    # Returns a string representation of this model.
    def to_s
      # This should be overridden by a child class
      super
    end

    # Returns the model objects that belong to this model.
    def children
      # This should be overridden by a child class
      []
    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
cuke_modeler-3.3.0 lib/cuke_modeler/models/model.rb
cuke_modeler-3.2.0 lib/cuke_modeler/models/model.rb
cuke_modeler-3.1.0 lib/cuke_modeler/models/model.rb
cuke_modeler-3.0.0 lib/cuke_modeler/models/model.rb
cuke_modeler-2.1.0 lib/cuke_modeler/models/model.rb
cuke_modeler-2.0.0 lib/cuke_modeler/models/model.rb
cuke_modeler-1.5.1 lib/cuke_modeler/models/model.rb
cuke_modeler-1.5.0 lib/cuke_modeler/models/model.rb
cuke_modeler-1.4.0 lib/cuke_modeler/models/model.rb
cuke_modeler-1.3.0 lib/cuke_modeler/models/model.rb
cuke_modeler-1.2.1 lib/cuke_modeler/models/model.rb
cuke_modeler-1.2.0 lib/cuke_modeler/models/model.rb
cuke_modeler-1.1.1 lib/cuke_modeler/models/model.rb
cuke_modeler-1.1.0 lib/cuke_modeler/models/model.rb
cuke_modeler-1.0.4 lib/cuke_modeler/models/model.rb
cuke_modeler-1.0.3 lib/cuke_modeler/models/model.rb
cuke_modeler-1.0.2 lib/cuke_modeler/models/model.rb
cuke_modeler-1.0.1 lib/cuke_modeler/models/model.rb
cuke_modeler-1.0.0 lib/cuke_modeler/models/model.rb