Sha256: 41da7bd2c8e58ed35b9a700c6fd408e1c782eb16f043ade84b04ed8233f537e1

Contents?: true

Size: 650 Bytes

Versions: 2

Compression:

Stored size: 650 Bytes

Contents

# frozen_string_literal: true

require 'thor'
require 'smartness_detector'
require 'smartness_detector/generators/install'


module SmartnessDetector
  class CLI < Thor
    desc 'Detect Smartness', 'Detect the smartness'
    def smartness(name)
      puts SmartnessDetector::Detect.smartness(name)
    end

    desc 'Pluralize the word', 'Smartly Pluralize the word'
    method_option :word, aliases: '-w'
    def pluralize
      puts SmartnessDetector::Detect.pluralize(options[:word])
    end

    desc 'install', 'Smartness Generator'
    def install(group, name)
      SmartnessDetector::Generators::Install.start([group, name])
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
smartness_detector-1.0.0 lib/smartness_detector/cli.rb
smartness_detector-0.1.2 lib/smartness_detector/cli.rb