module Hoe::Highline

Add Highline command-line interaction functions to Hoe Rakefiles.

Constants

COLOR_SCHEME

HighLine color scheme

REVISION

Version-control revision constant

VERSION

Library version constant

Attributes

highline[RW]

The HighLine object used for prompting

Public Instance Methods

define_highline_tasks() click to toggle source

Hoe hook – add the Highline functions to Kernel when the plugin is loaded.

# File lib/hoe/highline.rb, line 45
def define_highline_tasks
        $terminal = self.highline

        ::Kernel.extend( Forwardable )
        ::Kernel.def_delegators :$terminal, :agree, :ask, :choose, :color, :list, :say
end
initialize_highline() click to toggle source

Set up the plugin's instance variables.

# File lib/hoe/highline.rb, line 33
def initialize_highline
        HighLine.color_scheme = HighLine::ColorScheme.new( COLOR_SCHEME )
        @highline = HighLine.new( $stdin, $stderr )

        minor_version = VERSION[ /^\d+\.\d+/ ]
        self.extra_dev_deps << ['hoe-highline', "~> #{minor_version}"] unless
                self.name == 'hoe-highline'
end