Sha256: b7ef746759bb1bb06ee3c229841dc735ce0c40b58e43ddc193d79c677a518240

Contents?: true

Size: 602 Bytes

Versions: 10

Compression:

Stored size: 602 Bytes

Contents

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

module WatchTower
  module Editor
    extend ::ActiveSupport::Autoload

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

    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

10 entries across 10 versions & 1 rubygems

Version Path
watch_tower-0.0.3 lib/watch_tower/editor.rb
watch_tower-0.0.2 lib/watch_tower/editor.rb
watch_tower-0.0.1 lib/watch_tower/editor.rb
watch_tower-0.0.1.beta12 lib/watch_tower/editor.rb
watch_tower-0.0.1.beta11 lib/watch_tower/editor.rb
watch_tower-0.0.1.beta10 lib/watch_tower/editor.rb
watch_tower-0.0.1.beta9 lib/watch_tower/editor.rb
watch_tower-0.0.1.beta8 lib/watch_tower/editor.rb
watch_tower-0.0.1.beta7 lib/watch_tower/editor.rb
watch_tower-0.0.1.beta6 lib/watch_tower/editor.rb