Class: Evertils::Controller::Render

Inherits:
Base
  • Object
show all
Defined in:
lib/evertils/controllers/render.rb

Constant Summary

Constants inherited from Base

Base::OK, Base::QUIT, Base::QUIT_SOFT

Instance Attribute Summary

Attributes inherited from Base

#config, #request

Instance Method Summary collapse

Methods inherited from Base

#can_exec?, #exec, #initialize, #post_exec, #pre_exec, #sample

Constructor Details

This class inherits a constructor from Evertils::Controller::Base

Instance Method Details

#configure_allowed_fieldsObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/evertils/controllers/render.rb', line 14

def configure_allowed_fields
  @allowed_fields = config.translate_placeholders.pluck(
    :title,
    :title_format,
    :notebook,
    :path,
    :action,
    :tags
  )
end

#from_fileObject



6
7
8
9
10
11
12
# File 'lib/evertils/controllers/render.rb', line 6

def from_file
  configure_allowed_fields

  runner = ActionRunner.new
  runner.params = Evertils::Type.new(@allowed_fields[:path]).params
  runner.execute
end