Class: RemoteRuby::RailsFlavour

Inherits:
Flavour
  • Object
show all
Defined in:
lib/remote_ruby/flavour/rails_flavour.rb

Overview

Flavour to load Rails environment

Instance Method Summary collapse

Methods inherited from Flavour

build_flavours

Constructor Details

#initialize(environment: :development) ⇒ RailsFlavour

Returns a new instance of RailsFlavour.


4
5
6
# File 'lib/remote_ruby/flavour/rails_flavour.rb', line 4

def initialize(environment: :development)
  @environment = environment
end

Instance Method Details

#code_headerObject


8
9
10
11
12
13
# File 'lib/remote_ruby/flavour/rails_flavour.rb', line 8

def code_header
  <<-RUBY
  ENV['RAILS_ENV'] = '#{environment}'
  require './config/environment'
  RUBY
end