Class: PointRb::Actions::RetrieveParsedLayout

Inherits:
Object
  • Object
show all
Defined in:
lib/pointrb/actions/retrieve_parsed_layout.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ RetrieveParsedLayout

Returns a new instance of RetrieveParsedLayout.



4
5
6
# File 'lib/pointrb/actions/retrieve_parsed_layout.rb', line 4

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/pointrb/actions/retrieve_parsed_layout.rb', line 8

def call(env)
  layout_manager = PointRb::LayoutManager.new(env.layout_files, env.project)
  layout_name = env.command_line_options[:layout].to_sym

  env.layout = layout_manager.retrieve(layout_name)
  @app.call(env)
end