Sha256: 4841077a03f19802e277ccc72505d08378f999077e898c18b57c6296e45460d1

Contents?: true

Size: 287 Bytes

Versions: 1

Compression:

Stored size: 287 Bytes

Contents

# frozen_string_literal: true

module RailsAppGenerator
  # Map a boolean true to a command line flag in the format "--flag-name"
  # false is ignored
  class MapOptionBooleanFlag
    def self.map(name, value)
      value == true ? "--#{name.to_s.gsub('_', '-')}" : ''
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_app_generator-0.0.3 lib/rails_app_generator/options/map_option_boolean_flag.rb