Class: Rspec::JsonApi::Generators::InterfaceGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/rspec/json_api/interface/interface_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_interface_fileObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/generators/rspec/json_api/interface/interface_generator.rb', line 9

def copy_interface_file
  create_file "spec/rspec/json_api/interfaces/#{file_name}.rb", <<~FILE
    module RSpec
      module JsonApi
        module Interfaces
          #{file_name.upcase} = {
            # name: String
          }
        end
      end
    end
  FILE
end