Class: Rails::Generators::AppBase::GemfileEntry
- Inherits:
-
Struct
- Object
- Struct
- Rails::Generators::AppBase::GemfileEntry
- Defined in:
- lib/rails/generators/app_base.rb
Instance Attribute Summary collapse
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
- .github(name, github, branch = nil, comment = nil) ⇒ Object
- .path(name, path, comment = nil) ⇒ Object
- .version(name, version, comment = nil) ⇒ Object
Instance Method Summary collapse
-
#initialize(name, version, comment, options = {}, commented_out = false) ⇒ GemfileEntry
constructor
A new instance of GemfileEntry.
Constructor Details
#initialize(name, version, comment, options = {}, commented_out = false) ⇒ GemfileEntry
Returns a new instance of GemfileEntry.
240 241 242 |
# File 'lib/rails/generators/app_base.rb', line 240 def initialize(name, version, comment, = {}, commented_out = false) super end |
Instance Attribute Details
#version ⇒ Object
Returns the value of attribute version
239 240 241 |
# File 'lib/rails/generators/app_base.rb', line 239 def version @version end |
Class Method Details
.github(name, github, branch = nil, comment = nil) ⇒ Object
244 245 246 247 248 249 250 |
# File 'lib/rails/generators/app_base.rb', line 244 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
256 257 258 |
# File 'lib/rails/generators/app_base.rb', line 256 def self.path(name, path, comment = nil) new(name, nil, comment, path: path) end |
.version(name, version, comment = nil) ⇒ Object
252 253 254 |
# File 'lib/rails/generators/app_base.rb', line 252 def self.version(name, version, comment = nil) new(name, version, comment) end |