module Quarry class Markup #:nodoc: # = Step # class Step attr :parent attr :code attr :lineno def initialize(parent, code, lineno) @parent = parent @code = code.rstrip @lineno = lineno end alias_method :spec, :parent #def description # alias_method :description, :text #end end # = Macro # class Macro < Step attr :type def initialize(parent, code, lineno, type) super(parent, code, lineno) @type = type end end # = Header # class Header attr :parent attr :text attr :lineno def initialize(parent, text, lineno) @parent = parent @text = text.strip @lineno = lineno end alias_method :spec, :parent alias_method :description, :text end # = Comment # class Comment attr :parent attr :text attr :lineno def initialize(parent, text, lineno) @parent = parent @text = text.strip @lineno = lineno end alias_method :spec, :parent alias_method :description, :text # def type /^(\w{1,9})[:]/i =~ text $1.downcase.to_sym if $1 end alias_method :macro?, :type end end #class Markup end #module Quarry