Class: Jekyll::GeneratorSingleSource::Liquid::Drops::Release

Inherits:
Liquid::Drop
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/jekyll/generator-single-source/liquid/drops/release.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#releaseObject (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

#hashObject



18
19
20
# File 'lib/jekyll/generator-single-source/liquid/drops/release.rb', line 18

def hash
  @hash ||= "#{@release.edition}-#{@release.value}".hash
end