Source: show | on GitHub
# File railties/lib/rails/generators/app_base.rb, line 259 def self.floats(name, comment = nil) new(name, nil, comment) end
# File railties/lib/rails/generators/app_base.rb, line 247 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
# File railties/lib/rails/generators/app_base.rb, line 243 def initialize(name, version, comment, options = {}, commented_out = false) super end
# File railties/lib/rails/generators/app_base.rb, line 263 def self.path(name, path, comment = nil) new(name, nil, comment, path: path) end
# File railties/lib/rails/generators/app_base.rb, line 255 def self.version(name, version, comment = nil) new(name, version, comment) end
# File railties/lib/rails/generators/app_base.rb, line 277 def to_s [ ("# #{comment}\n" if comment), ("# " if commented_out), "gem \"#{name}\"", (", \"#{version}\"" if version), *options.map { |key, val| ", #{key}: #{val.inspect}" } ].compact.join end
# File railties/lib/rails/generators/app_base.rb, line 267 def version version = super if version.is_a?(Array) version.join('", "') else version end end