Class Public methods
floats(name, comment = nil) Link
Source: show
# File railties/lib/rails/generators/app_base.rb, line 389 def self.floats(name, comment = nil) new(name, nil, comment) end
github(name, github, branch = nil, comment = nil) Link
Source: show
# File railties/lib/rails/generators/app_base.rb, line 377 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
new(name, version, comment, options = {}, commented_out = false) Link
Source: show
# File railties/lib/rails/generators/app_base.rb, line 373 def initialize(name, version, comment, options = {}, commented_out = false) super end
path(name, path, comment = nil) Link
Source: show
# File railties/lib/rails/generators/app_base.rb, line 393 def self.path(name, path, comment = nil) new(name, nil, comment, path: path) end
version(name, version, comment = nil) Link
Source: show
# File railties/lib/rails/generators/app_base.rb, line 385 def self.version(name, version, comment = nil) new(name, version, comment) end
Instance Public methods
to_s() Link
Source: show
# File railties/lib/rails/generators/app_base.rb, line 397 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