Class: Quarry::Spec::Comment
Overview
Comment
Instance Attribute Summary collapse
-
#lineno ⇒ Object
readonly
Returns the value of attribute lineno.
-
#parent ⇒ Object
(also: #spec)
readonly
Returns the value of attribute parent.
-
#text ⇒ Object
(also: #description)
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(parent, text, lineno) ⇒ Comment
constructor
A new instance of Comment.
- #type ⇒ Object (also: #macro?)
Constructor Details
#initialize(parent, text, lineno) ⇒ Comment
Returns a new instance of Comment.
59 60 61 62 63 |
# File 'lib/quarry/spec/step.rb', line 59 def initialize(parent, text, lineno) @parent = parent @text = text.strip @lineno = lineno end |
Instance Attribute Details
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
57 58 59 |
# File 'lib/quarry/spec/step.rb', line 57 def lineno @lineno end |
#parent ⇒ Object (readonly) Also known as: spec
Returns the value of attribute parent.
55 56 57 |
# File 'lib/quarry/spec/step.rb', line 55 def parent @parent end |
#text ⇒ Object (readonly) Also known as: description
Returns the value of attribute text.
56 57 58 |
# File 'lib/quarry/spec/step.rb', line 56 def text @text end |
Instance Method Details
#type ⇒ Object Also known as: macro?
69 70 71 72 |
# File 'lib/quarry/spec/step.rb', line 69 def type /^(\w{1,9})[:]/i =~ text $1.downcase.to_sym if $1 end |