Class: RemoteRuby::Flavour

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

Overview

Base class for Flavours: addons to execution context to insert additonal code to the generated remote code.

Direct Known Subclasses

RailsFlavour

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params: {}) ⇒ Flavour

Returns a new instance of Flavour.


19
# File 'lib/remote_ruby/flavour.rb', line 19

def initialize(params: {}); end

Class Method Details

.build_flavours(params = {}) ⇒ Object


5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/remote_ruby/flavour.rb', line 5

def self.build_flavours(params = {})
  res = []

  {
    rails: RemoteRuby::RailsFlavour
  }.each do |name, klass|
    options = params.delete(name)

    res << klass.new(**options) if options
  end

  res
end

Instance Method Details

#code_headerObject


21
# File 'lib/remote_ruby/flavour.rb', line 21

def code_header; end