Sha256: 4dfb3a8e34a2db3ce0915d0f3e5833f57ad9a433192c110eab2a2f689e7b24b9

Contents?: true

Size: 702 Bytes

Versions: 12

Compression:

Stored size: 702 Bytes

Contents

#!/usr/bin/env ruby

require "thor"
require_relative "../lib/codelation"

module Codelation
  class Cli < Thor
    include Thor::Actions
    # Add the ablitity to run commands like:
    #   `heroku config:set`
    # This would run the defined method:
    #   `config_set`
    def method_missing(method, *args, &block)
      if method.to_s.split(":").length >= 2
        self.send(method.to_s.gsub(":", "_"), *args)
      elsif method == :run
        self.walk(*args)
      else
        super
      end
    end

    # This is the directory where your templates should be placed.
    def self.source_root
      File.expand_path("../../resources", __FILE__)
    end
  end
end

Codelation::Cli.start(ARGV)

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
codelation-cli-0.0.12 bin/codelation
codelation-cli-0.0.11 bin/codelation
codelation-cli-0.0.10 bin/codelation
codelation-cli-0.0.9 bin/codelation
codelation-cli-0.0.8 bin/codelation
codelation-cli-0.0.7 bin/codelation
codelation-cli-0.0.6 bin/codelation
codelation-cli-0.0.5 bin/codelation
codelation-cli-0.0.4 bin/codelation
codelation-cli-0.0.3 bin/codelation
codelation-cli-0.0.2 bin/codelation
codelation-cli-0.0.1 bin/codelation