Class: Quails::Generators::AppBase::GemfileEntry

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Struct

#as_json

Constructor Details

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

Returns a new instance of GemfileEntry.



212
213
214
# File 'railties/lib/rails/generators/app_base.rb', line 212

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

Instance Attribute Details

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



211
212
213
# File 'railties/lib/rails/generators/app_base.rb', line 211

def version
  @version
end

Class Method Details

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



216
217
218
219
220
221
222
# File 'railties/lib/rails/generators/app_base.rb', line 216

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



228
229
230
# File 'railties/lib/rails/generators/app_base.rb', line 228

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

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



224
225
226
# File 'railties/lib/rails/generators/app_base.rb', line 224

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