Class: RailsFormation::Cli::FileAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/rails-formation/cli/file_adapter.rb

Instance Method Summary collapse

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

#templateObject



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