Sha256: f2fb70b10f31d428b8e66afe765338d474ab8be54aeda0a15da6020c3670beac

Contents?: true

Size: 561 Bytes

Versions: 2

Compression:

Stored size: 561 Bytes

Contents

require 'thor/group'

module Spline

  class Command < Thor::Group
    include Thor::Actions

    # root of project, from where we reference the templates
    def self.source_root
      File.dirname(__FILE__) + "/.."
    end

    # name refers to the class name with module. Spline::Command in this case
    def self.command_name
      name.downcase[/\w+::(\w+)command/, 1]
    end

    def self.alias
      command_name
    end

    def self.usage_tip
      command_name
    end

    def self.description
      "#{command_name} description"
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spline-0.0.17 lib/spline/commands/command.rb
spline-0.0.16 lib/spline/commands/command.rb