Sha256: 03c56913cfbb1ac6ba830281d8cd23f00f62ae051870dd3470106fb69d58f569
Contents?: true
Size: 839 Bytes
Versions: 2
Compression:
Stored size: 839 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) error_message = "Can only create models from Strings but was given a #{source_text.class}." raise(ArgumentError, error_message) 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cuke_modeler-3.5.0 | lib/cuke_modeler/models/model.rb |
cuke_modeler-3.4.0 | lib/cuke_modeler/models/model.rb |