Sha256: eb7950eeba16ac682104020fe613ed755f6cf2126c86523e4e94d344f8abea72

Contents?: true

Size: 535 Bytes

Versions: 57

Compression:

Stored size: 535 Bytes

Contents

module PaidUp
  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

57 entries across 57 versions & 1 rubygems

Version Path
paid_up-0.9.13 lib/generators/paid_up/utils.rb
paid_up-0.9.12 lib/generators/paid_up/utils.rb
paid_up-0.9.11 lib/generators/paid_up/utils.rb
paid_up-0.9.10 lib/generators/paid_up/utils.rb
paid_up-0.9.9 lib/generators/paid_up/utils.rb
paid_up-0.9.8 lib/generators/paid_up/utils.rb
paid_up-0.9.7 lib/generators/paid_up/utils.rb
paid_up-0.9.6 lib/generators/paid_up/utils.rb
paid_up-0.9.5 lib/generators/paid_up/utils.rb
paid_up-0.9.4 lib/generators/paid_up/utils.rb
paid_up-0.9.3 lib/generators/paid_up/utils.rb
paid_up-0.9.2 lib/generators/paid_up/utils.rb
paid_up-0.9.1 lib/generators/paid_up/utils.rb
paid_up-0.9.0 lib/generators/paid_up/utils.rb
paid_up-0.8.1 lib/generators/paid_up/utils.rb
paid_up-0.7.11 lib/generators/paid_up/utils.rb
paid_up-0.7.10 lib/generators/paid_up/utils.rb
paid_up-0.7.9 lib/generators/paid_up/utils.rb
paid_up-0.7.8 lib/generators/paid_up/utils.rb
paid_up-0.7.7 lib/generators/paid_up/utils.rb