Class: RailsFormation::Cli::FileAdapter
- Inherits:
-
Object
- Object
- RailsFormation::Cli::FileAdapter
- Defined in:
- lib/rails-formation/cli/file_adapter.rb
Instance Method Summary collapse
-
#initialize(file_path) ⇒ FileAdapter
constructor
A new instance of FileAdapter.
- #template ⇒ Object
Constructor Details
#initialize(file_path) ⇒ FileAdapter
Returns a new instance of FileAdapter.
8 9 10 |
# File 'lib/rails-formation/cli/file_adapter.rb', line 8 def initialize(file_path) @file_path = file_path end |
Instance Method Details
#template ⇒ Object
12 13 14 15 |
# File 'lib/rails-formation/cli/file_adapter.rb', line 12 def template raw_json = File.read(@file_path) JSON.parse(raw_json) end |