Class: Charyf::Generators::AppBase::GemfileEntry

Inherits:
Struct
  • Object
show all
Defined in:
lib/charyf/utils/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.



163
164
165
# File 'lib/charyf/utils/generators/app_base.rb', line 163

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



162
163
164
# File 'lib/charyf/utils/generators/app_base.rb', line 162

def version
  @version
end

Class Method Details

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



167
168
169
170
171
172
173
# File 'lib/charyf/utils/generators/app_base.rb', line 167

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



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

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

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



175
176
177
# File 'lib/charyf/utils/generators/app_base.rb', line 175

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