Class: Swarker::Readers::FileReader
- Inherits:
-
Object
- Object
- Swarker::Readers::FileReader
- Defined in:
- lib/swarker/readers/file_reader.rb
Constant Summary collapse
- JSON_EXT =
'.json'.freeze
- YAML_EXT =
'.yml'.freeze
- ERB_EXT =
'.erb'.freeze
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path) ⇒ FileReader
constructor
A new instance of FileReader.
- #read ⇒ Object
Constructor Details
#initialize(path) ⇒ FileReader
Returns a new instance of FileReader.
14 15 16 |
# File 'lib/swarker/readers/file_reader.rb', line 14 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/swarker/readers/file_reader.rb', line 8 def path @path end |
Instance Method Details
#read ⇒ Object
18 19 20 |
# File 'lib/swarker/readers/file_reader.rb', line 18 def read HashWithIndifferentAccess.new(readed_hash) end |