Class: Jekyll::GeneratorSingleSource::Liquid::Drops::Release
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Jekyll::GeneratorSingleSource::Liquid::Drops::Release
- Extended by:
- Forwardable
- Defined in:
- lib/jekyll/generator-single-source/liquid/drops/release.rb
Instance Attribute Summary collapse
-
#release ⇒ Object
readonly
Returns the value of attribute release.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #hash ⇒ Object
-
#initialize(release) ⇒ Release
constructor
A new instance of Release.
Constructor Details
#initialize(release) ⇒ Release
Returns a new instance of Release.
12 13 14 |
# File 'lib/jekyll/generator-single-source/liquid/drops/release.rb', line 12 def initialize(release) @release = release end |
Instance Attribute Details
#release ⇒ Object (readonly)
Returns the value of attribute release.
10 11 12 |
# File 'lib/jekyll/generator-single-source/liquid/drops/release.rb', line 10 def release @release end |
Instance Method Details
#==(other) ⇒ Object
22 23 24 25 26 |
# File 'lib/jekyll/generator-single-source/liquid/drops/release.rb', line 22 def ==(other) return @release.value == other if other.is_a?(String) @release.to_h == other.release.to_h end |
#hash ⇒ Object
18 19 20 |
# File 'lib/jekyll/generator-single-source/liquid/drops/release.rb', line 18 def hash @hash ||= "#{@release.edition}-#{@release.value}".hash end |