Class: Docspec::Document

Inherits:
Object
  • Object
show all
Defined in:
lib/docspec/document.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#filenameObject (readonly)

Returns the value of attribute filename.



3
4
5
# File 'lib/docspec/document.rb', line 3

def filename
  @filename
end

Instance Method Details

#examplesObject



13
14
15
# File 'lib/docspec/document.rb', line 13

def examples
  @examples ||= examples!
end

#markdownObject



9
10
11
# File 'lib/docspec/document.rb', line 9

def markdown
  @markdown ||= File.read filename
end