Class: Rails::Generators::AppBase::GemfileEntry

Inherits:
Struct
  • Object
show all
Defined in:
lib/rails/generators/app_base.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, version, comment, options = {}, commented_out = false) ⇒ GemfileEntry

Returns a new instance of GemfileEntry.



179
180
181
# File 'lib/rails/generators/app_base.rb', line 179

def initialize(name, version, comment, options = {}, commented_out = false)
  super
end

Class Method Details

.github(name, github, branch = nil, comment = nil) ⇒ Object



183
184
185
186
187
188
189
# File 'lib/rails/generators/app_base.rb', line 183

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

.path(name, path, comment = nil) ⇒ Object



195
196
197
# File 'lib/rails/generators/app_base.rb', line 195

def self.path(name, path, comment = nil)
  new(name, nil, comment, path: path)
end

.version(name, version, comment = nil) ⇒ Object



191
192
193
# File 'lib/rails/generators/app_base.rb', line 191

def self.version(name, version, comment = nil)
  new(name, version, comment)
end