Class: Mrsk::Commands::Builder

Inherits:
Base
  • Object
show all
Defined in:
lib/mrsk/commands/builder.rb

Defined Under Namespace

Classes: Multiarch, Native

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Mrsk::Commands::Base

Instance Method Details

#multiarchObject



28
29
30
# File 'lib/mrsk/commands/builder.rb', line 28

def multiarch
  @multiarch ||= Mrsk::Commands::Builder::Multiarch.new(config)
end

#multiarch_remoteObject



32
33
34
# File 'lib/mrsk/commands/builder.rb', line 32

def multiarch_remote
  @multiarch_remote ||= Mrsk::Commands::Builder::Multiarch::Remote.new(config)
end

#nameObject



7
8
9
# File 'lib/mrsk/commands/builder.rb', line 7

def name
  target.class.to_s.demodulize.downcase.inquiry
end

#nativeObject



24
25
26
# File 'lib/mrsk/commands/builder.rb', line 24

def native
  @native ||= Mrsk::Commands::Builder::Native.new(config)
end

#targetObject



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/mrsk/commands/builder.rb', line 11

def target
  case
  when config.builder.nil?
    multiarch
  when config.builder["multiarch"] == false
    native
  when config.builder["local"] && config.builder["local"]
    multiarch_remote
  else
    raise ArgumentError, "Builder configuration incorrect: #{config.builder.inspect}"
  end
end