class Rails::Generators::AppBase::GemfileEntry
def self.floats(name, comment = nil)
def self.floats(name, comment = nil) new(name, nil, comment) end
def self.github(name, github, branch = nil, comment = nil)
def self.github(name, github, branch = nil, comment = nil) if branch new(name, nil, comment, github: github, branch: branch) else new(name, nil, comment, github: github) end end
def self.path(name, path, comment = nil)
def self.path(name, path, comment = nil) new(name, nil, comment, path: path) end
def self.version(name, version, comment = nil)
def self.version(name, version, comment = nil) new(name, version, comment) end
def initialize(name, version, comment, options = {}, commented_out = false)
def initialize(name, version, comment, options = {}, commented_out = false) super end
def to_s
def to_s [ (comment.gsub(/^/, "# ").chomp + "\n" if comment), ("# " if commented_out), "gem \"#{name}\"", *Array(version).map { |constraint| ", \"#{constraint}\"" }, *options.map { |key, value| ", #{key}: #{value.inspect}" }, ].compact.join end