Class: LanguageCards::Controllers::ApplicationController
- Inherits:
-
Object
- Object
- LanguageCards::Controllers::ApplicationController
- Includes:
- Helpers::ViewHelper
- Defined in:
- lib/language_cards/controllers/application_controller.rb
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ ApplicationController
constructor
A new instance of ApplicationController.
- #render(_binding) ⇒ Object
Methods included from Helpers::ViewHelper
#clear, #divider, #draw, #humanize, #snake, #t, #wordwrap
Constructor Details
#initialize(opts = {}) ⇒ ApplicationController
Returns a new instance of ApplicationController.
6 7 8 |
# File 'lib/language_cards/controllers/application_controller.rb', line 6 def initialize(opts = {}) @opts = opts end |
Instance Method Details
#render(_binding) ⇒ Object
10 11 12 13 14 |
# File 'lib/language_cards/controllers/application_controller.rb', line 10 def render(_binding) view = ERB.new IO.read File.("../view/#{snake name}.erb", __dir__) view.result(_binding) end |