Sha256: 5fd3d5cd700856388aaeb12ed04a74d823bca7ef13d202f0e0cf6f78edaf8915

Contents?: true

Size: 542 Bytes

Versions: 7

Compression:

Stored size: 542 Bytes

Contents

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

7 entries across 7 versions & 1 rubygems

Version Path
private_person-0.5.0 lib/generators/private_person/utils.rb
private_person-0.4.0 lib/generators/private_person/utils.rb
private_person-0.3.1 lib/generators/private_person/utils.rb
private_person-0.3.0 lib/generators/private_person/utils.rb
private_person-0.2.9 lib/generators/private_person/utils.rb
private_person-0.2.4 lib/generators/private_person/utils.rb
private_person-0.1.0 lib/generators/private_person/utils.rb