Class: DocRSpec::Context::Example
- Inherits:
-
Object
- Object
- DocRSpec::Context::Example
- Defined in:
- lib/doc_rspec/context/example.rb
Instance Attribute Summary collapse
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
-
#lnb ⇒ Object
readonly
Returns the value of attribute lnb.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
6 7 8 |
# File 'lib/doc_rspec/context/example.rb', line 6 def lines @lines end |
#lnb ⇒ Object (readonly)
Returns the value of attribute lnb.
6 7 8 |
# File 'lib/doc_rspec/context/example.rb', line 6 def lnb @lnb end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/doc_rspec/context/example.rb', line 6 def name @name end |
Instance Method Details
#add(code) ⇒ Object
8 9 10 |
# File 'lib/doc_rspec/context/example.rb', line 8 def add(code) lines << code end |
#empty? ⇒ Boolean
16 |
# File 'lib/doc_rspec/context/example.rb', line 16 def empty? = lines.empty? |
#it_name(path) ⇒ Object
12 13 14 |
# File 'lib/doc_rspec/context/example.rb', line 12 def it_name(path) "#{name || "example from rdoc"} (#{path}:#{lnb})" end |