Class: ActiveMocker::StringReader Private
- Inherits:
-
Object
- Object
- ActiveMocker::StringReader
- Defined in:
- lib/active_mocker/string_reader.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize(file) ⇒ StringReader
constructor
private
A new instance of StringReader.
- #read(path) ⇒ Object private
Constructor Details
#initialize(file) ⇒ StringReader
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of StringReader.
4 5 6 |
# File 'lib/active_mocker/string_reader.rb', line 4 def initialize(file) @read = file end |
Instance Method Details
#read(path) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 11 12 13 14 |
# File 'lib/active_mocker/string_reader.rb', line 8 def read(path) if @read.is_a?(Hash) @read[path.sub('/','').sub('.rb','')] else @read end end |