Class: WhatTheGem::Changes::Version
- Defined in:
- lib/whatthegem/changes.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#header ⇒ Object
Returns the value of attribute header.
-
#number ⇒ Object
Returns the value of attribute number.
Instance Method Summary collapse
-
#initialize(number:, header:, body:) ⇒ Version
constructor
A new instance of Version.
- #to_h ⇒ Object
Constructor Details
#initialize(number:, header:, body:) ⇒ Version
Returns a new instance of Version.
11 12 13 |
# File 'lib/whatthegem/changes.rb', line 11 def initialize(number:, header:, body:) super(number: ::Gem::Version.new(number), header: header, body: body) end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body
10 11 12 |
# File 'lib/whatthegem/changes.rb', line 10 def body @body end |
#header ⇒ Object
Returns the value of attribute header
10 11 12 |
# File 'lib/whatthegem/changes.rb', line 10 def header @header end |
#number ⇒ Object
Returns the value of attribute number
10 11 12 |
# File 'lib/whatthegem/changes.rb', line 10 def number @number end |
Instance Method Details
#to_h ⇒ Object
15 16 17 |
# File 'lib/whatthegem/changes.rb', line 15 def to_h super.merge(number: number.to_s) end |