Class: Jekyll::GeneratorSingleSource::Product::Edition
- Inherits:
-
Object
- Object
- Jekyll::GeneratorSingleSource::Product::Edition
- Defined in:
- lib/jekyll/generator-single-source/product/edition.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(edition:, site:) ⇒ Edition
constructor
A new instance of Edition.
- #latest_release ⇒ Object
- #name ⇒ Object
- #releases ⇒ Object
Constructor Details
#initialize(edition:, site:) ⇒ Edition
Returns a new instance of Edition.
12 13 14 15 |
# File 'lib/jekyll/generator-single-source/product/edition.rb', line 12 def initialize(edition:, site:) @edition = edition @site = site end |
Class Method Details
.all(site:) ⇒ Object
8 9 10 |
# File 'lib/jekyll/generator-single-source/product/edition.rb', line 8 def self.all(site:) GeneratorConfig.new(site).editions end |
Instance Method Details
#latest_release ⇒ Object
25 26 27 |
# File 'lib/jekyll/generator-single-source/product/edition.rb', line 25 def latest_release @latest_release ||= releases.detect(&:latest?) end |
#name ⇒ Object
29 30 31 |
# File 'lib/jekyll/generator-single-source/product/edition.rb', line 29 def name @name ||= @edition end |