Module: Terminalwire::Thor

Defined in:
lib/terminalwire/rails.rb

Overview

If I move this, then the current production integration breaks because it wants ‘include Terminalwire::Thor`.

Defined Under Namespace

Modules: ClassMethods Classes: Shell

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/terminalwire/rails.rb', line 142

def self.included(base)
  base.include Terminalwire::Server::Thor
  base.extend ClassMethods

  # I have to do this in a block to deal with some of Thor's DSL
  base.class_eval do
    protected

    no_commands do
      def_delegators :shell,
        :session

      include ::Rails.application.routes.url_helpers
    end
  end
end