Sha256: 40ef663c7ef168ac95c100010db5f7c388a5662f775dc1ff85e75a866e9322d7

Contents?: true

Size: 583 Bytes

Versions: 5

Compression:

Stored size: 583 Bytes

Contents

# -*- encoding: utf-8 -*-

module WatchTower
  module Editor
    extend ::ActiveSupport::Autoload

    autoload :BaseAppscript
    autoload :BasePs
    autoload :Textmate
    autoload :Xcode

    def self.editors
      Editor.constants.                                     # Collect the defined constants
        collect { |c| "::WatchTower::Editor::#{c}"}.        # Access them under the Server module
        collect(&:constantize).                             # Make them a constant
        select { |c| c.class == Class }                     # Keep only classes
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
watch_tower-0.0.1.beta5 lib/watch_tower/editor.rb
watch_tower-0.0.1.beta4 lib/watch_tower/editor.rb
watch_tower-0.0.1.beta3 lib/watch_tower/editor.rb
watch_tower-0.0.1.beta2 lib/watch_tower/editor.rb
watch_tower-0.0.1.beta1 lib/watch_tower/editor.rb