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

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

Instance Attribute Summary collapse

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.



205
206
207
# File 'lib/rails/generators/app_base.rb', line 205

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



204
205
206
# File 'lib/rails/generators/app_base.rb', line 204

def version
  @version
end

Class Method Details

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



209
210
211
212
213
214
215
# File 'lib/rails/generators/app_base.rb', line 209

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



221
222
223
# File 'lib/rails/generators/app_base.rb', line 221

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

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



217
218
219
# File 'lib/rails/generators/app_base.rb', line 217

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