class ReadmeSpec::File

Public Class Methods

new(path) click to toggle source
# File lib/readme_spec.rb, line 46
def initialize(path)
  @path = path
end

Public Instance Methods

content() click to toggle source
# File lib/readme_spec.rb, line 61
def content
  ::File.read(@path)
end
load_content() click to toggle source
# File lib/readme_spec.rb, line 50
def load_content
  validate
  content
end
validate() click to toggle source
# File lib/readme_spec.rb, line 55
def validate
  unless ::File.file?(@path)
    raise ReadmeSpecInvalidFileError, @path
  end
end