Sha256: 74711c822ab9f9f20674c04bdbf6e48899692f920dcee70668c436fb049e74e7

Contents?: true

Size: 455 Bytes

Versions: 3

Compression:

Stored size: 455 Bytes

Contents

module LunarShell
  module Satellites
    class HelpController < LunarShell::SatellitesController
      PUBLIC = false

      def run
        @message = 'Never give up! Never surrender!'
      end

      private

      def commands
        @commands ||= self.class.superclass.subclasses.
          select { |sat| sat::PUBLIC }.
          map { |sat| sat.name.split('::').last.underscore[0..-12] }
      end
      helper_method :commands
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lunar_shell-0.5.0 app/controllers/lunar_shell/satellites/help_controller.rb
lunar_shell-0.4.1 app/controllers/lunar_shell/satellites/help_controller.rb
lunar_shell-0.3.0 app/controllers/lunar_shell/satellites/help_controller.rb