Sha256: 606f786bc92937c25de56214b844994e1b2a428ba61bcd8c10161b5e612ec62f
Contents?: true
Size: 653 Bytes
Versions: 12
Compression:
Stored size: 653 Bytes
Contents
# frozen_string_literal: true module RailsAdmin module Generators module Utils module InstanceMethods def display(output, color = :green) say(" - #{output}", color) end def ask_for(wording, default_value = nil, override_if_present_value = nil) if override_if_present_value.present? display("Using [#{override_if_present_value}] for question '#{wording}'") && override_if_present_value else ask(" ? #{wording} Press <enter> for [#{default_value}] >", :yellow).presence || default_value end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems