Sha256: 516e2321b222c141f5f1a08ed1d93aaefeeb8169853dc6f101dcaf1bb7610ec1

Contents?: true

Size: 455 Bytes

Versions: 2

Compression:

Stored size: 455 Bytes

Contents

module VER
  class Executor
    class ExSyntax < Entry
      def setup
        callback.update_on_change = true
        @syntaxes = VER::Syntax.list.map{|fullpath|
          File.basename(fullpath, File.extname(fullpath))
        }
      end

      def choices(name)
        subset(name, @syntaxes)
      end

      def action(name)
        caller.load_syntax(name)
        caller.touch!('1.0', 'end')
        callback.destroy
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ver-2010.08 lib/ver/executor/syntax.rb
ver-2010.02 lib/ver/executor/syntax.rb