Sha256: 93168a1fb68768d9167a73d6ddaf4a3f0ffcef1b9f704164a0aaa1f2c05599bd

Contents?: true

Size: 539 Bytes

Versions: 25

Compression:

Stored size: 539 Bytes

Contents

module Bootswitch
  module Generators
    module Utils
      def output(output, color = :green)
        say("           -  #{output}", color)
      end

      def ask_for(wording, default_value = nil, override_if_present_value = nil)
        override_if_present_value.present? ?
          display("Using [#{override_if_present_value}] for question '#{wording}'") && override_if_present_value :
          ask("           ?  #{wording} Press <enter> for [#{default_value}] >", :yellow).presence || default_value
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
bootswitch-0.6.0 lib/generators/bootswitch/utils.rb
bootswitch-0.5.4 lib/generators/bootswitch/utils.rb
bootswitch-0.5.3 lib/generators/bootswitch/utils.rb
bootswitch-0.5.2 lib/generators/bootswitch/utils.rb
bootswitch-0.5.1 lib/generators/bootswitch/utils.rb
bootswitch-0.5.0 lib/generators/bootswitch/utils.rb
bootswitch-0.4.0 lib/generators/bootswitch/utils.rb
bootswitch-0.3.0 lib/generators/bootswitch/utils.rb
bootswitch-0.2.2 lib/generators/bootswitch/utils.rb
bootswitch-0.2.1 lib/generators/bootswitch/utils.rb
bootswitch-0.2.0 lib/generators/bootswitch/utils.rb
bootswitch-0.1.3 lib/generators/bootswitch/utils.rb
bootswitch-0.1.2 lib/generators/bootswitch/utils.rb
bootswitch-0.1.1 lib/generators/bootswitch/utils.rb
bootswitch-0.0.13 lib/generators/bootswitch/utils.rb
bootswitch-0.0.12 lib/generators/bootswitch/utils.rb
bootswitch-0.0.11 lib/generators/bootswitch/utils.rb
bootswitch-0.0.9 lib/generators/bootswitch/utils.rb
bootswitch-0.0.8 lib/generators/bootswitch/utils.rb
bootswitch-0.0.7 lib/generators/bootswitch/utils.rb