Fix constant resolution in layout CLI option
This commit is contained in:
parent
68cec67402
commit
20cdec5fce
@ -9,3 +9,7 @@ Feature: layout CLI option
|
||||
"""
|
||||
When I run uhwm with option -v -r./layout -l MyLayout
|
||||
Then the output must match /layout.+mylayout/i
|
||||
|
||||
Scenario: resolves layout class from the root namespace
|
||||
When I run uhwm with option -v -l Layout
|
||||
Then the output must contain "uninitialized constant Layout"
|
||||
|
@ -68,7 +68,7 @@ module Uh
|
||||
log "Loaded `#{feature}' ruby feature"
|
||||
end
|
||||
opts.on '-l', '--layout LAYOUT', 'specify layout' do |layout|
|
||||
@env.layout_class = self.class.const_get layout.to_sym
|
||||
@env.layout_class = Object.const_get layout.to_sym
|
||||
end
|
||||
opts.on '-w', Workers.types, '--worker WORKER',
|
||||
'specify worker' do |worker|
|
||||
|
Loading…
x
Reference in New Issue
Block a user