Class: Docspec::Document
- Inherits:
-
Object
- Object
- Docspec::Document
- Defined in:
- lib/docspec/document.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Instance Method Summary collapse
- #examples ⇒ Object
-
#initialize(filename) ⇒ Document
constructor
A new instance of Document.
- #markdown ⇒ Object
Constructor Details
#initialize(filename) ⇒ Document
Returns a new instance of Document.
5 6 7 |
# File 'lib/docspec/document.rb', line 5 def initialize(filename) @filename = filename end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
3 4 5 |
# File 'lib/docspec/document.rb', line 3 def filename @filename end |
Instance Method Details
#examples ⇒ Object
13 14 15 |
# File 'lib/docspec/document.rb', line 13 def examples @examples ||= examples! end |
#markdown ⇒ Object
9 10 11 |
# File 'lib/docspec/document.rb', line 9 def markdown @markdown ||= File.read filename end |