Class: Munola::Resolver
- Inherits:
-
Enola::Resolver
- Object
- Enola::Resolver
- Munola::Resolver
- Defined in:
- lib/munola/channel.rb
Overview
The binary this channel drives is fetched from the fork's releases; until the first one is cut, MUNOLA_BINARY names a binary to drive instead, and every command says which one answered.
Instance Method Summary collapse
-
#initialize(override: ENV.fetch("MUNOLA_BINARY", nil), **options) ⇒ Resolver
constructor
A new instance of Resolver.
- #resolve ⇒ Object
Constructor Details
#initialize(override: ENV.fetch("MUNOLA_BINARY", nil), **options) ⇒ Resolver
Returns a new instance of Resolver.
16 17 18 19 |
# File 'lib/munola/channel.rb', line 16 def initialize(override: ENV.fetch("MUNOLA_BINARY", nil), **) super(**) @override = override end |
Instance Method Details
#resolve ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/munola/channel.rb', line 21 def resolve return super unless @override raise Enola::Unavailable, "MUNOLA_BINARY names #{@override}, which is not executable" unless File.executable?(@override) Found.new(@override, "MUNOLA_BINARY (#{Enola::Probe.new(@override).version || 'no version answered'})") end |