class CukeModeler::Model
A class modeling an element of a Cucumber suite.
Public Class Methods
new(source_text = nil)
click to toggle source
Creates a new Model
object and, if source_text is provided, populates the object.
# File lib/cuke_modeler/models/model.rb, line 12 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
Public Instance Methods
children()
click to toggle source
Returns the model objects that belong to this model.
# File lib/cuke_modeler/models/model.rb, line 26 def children [] end
to_s()
click to toggle source
Returns a string representation of this model.
Calls superclass method
# File lib/cuke_modeler/models/model.rb, line 20 def to_s # This should be overridden by a child class super end