Class: Nextgen::RailsVersion

Inherits:
Struct
  • Object
show all
Defined in:
lib/nextgen/rails_version.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#argsObject

Returns the value of attribute args

Returns:

  • (Object)

    the current value of args



8
9
10
# File 'lib/nextgen/rails_version.rb', line 8

def args
  @args
end

#asset_pipelinesObject

Returns the value of attribute asset_pipelines

Returns:

  • (Object)

    the current value of asset_pipelines



8
9
10
# File 'lib/nextgen/rails_version.rb', line 8

def asset_pipelines
  @asset_pipelines
end

#databasesObject

Returns the value of attribute databases

Returns:

  • (Object)

    the current value of databases



8
9
10
# File 'lib/nextgen/rails_version.rb', line 8

def databases
  @databases
end

#default_featuresObject

Returns the value of attribute default_features

Returns:

  • (Object)

    the current value of default_features



8
9
10
# File 'lib/nextgen/rails_version.rb', line 8

def default_features
  @default_features
end

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



8
9
10
# File 'lib/nextgen/rails_version.rb', line 8

def label
  @label
end

#optional_featuresObject

Returns the value of attribute optional_features

Returns:

  • (Object)

    the current value of optional_features



8
9
10
# File 'lib/nextgen/rails_version.rb', line 8

def optional_features
  @optional_features
end

Class Method Details

.currentObject



19
20
21
22
23
# File 'lib/nextgen/rails_version.rb', line 19

def current
  from_yaml(:current) do |version|
    version.label.sub!("%%CURRENT_VERSION%%") { ::Rails.version }
  end
end

.edgeObject



25
26
27
# File 'lib/nextgen/rails_version.rb', line 25

def edge
  from_yaml(:edge)
end

.mainObject



29
30
31
32
33
# File 'lib/nextgen/rails_version.rb', line 29

def main
  from_yaml(:main) do |version|
    version.label.sub!("%%MAIN_VERSION%%") { main_version }
  end
end