Class: Kettle::Dev::ReadmeBackers::Backer

Inherits:
Object
  • Object
show all
Defined in:
lib/kettle/dev/readme_backers.rb

Overview

Ruby 2.3 compatibility: Struct keyword_init added in Ruby 2.5
Switch to struct when dropping ruby < 2.5
Backer = Struct.new(:name, :image, :website, :profile, keyword_init: true)
Fallback for Ruby < 2.5 where Struct keyword_init is unsupported

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: nil, image: nil, website: nil, profile: nil, **_ignored) ⇒ Backer

Returns a new instance of Backer.



35
36
37
38
39
40
# File 'lib/kettle/dev/readme_backers.rb', line 35

def initialize(name: nil, image: nil, website: nil, profile: nil, **_ignored)
  @name = name
  @image = image
  @website = website
  @profile = profile
end

Instance Attribute Details

#imageObject

Returns the value of attribute image.



33
34
35
# File 'lib/kettle/dev/readme_backers.rb', line 33

def image
  @image
end

#nameObject

Returns the value of attribute name.



33
34
35
# File 'lib/kettle/dev/readme_backers.rb', line 33

def name
  @name
end

#profileObject

Returns the value of attribute profile.



33
34
35
# File 'lib/kettle/dev/readme_backers.rb', line 33

def profile
  @profile
end

#websiteObject

Returns the value of attribute website.



33
34
35
# File 'lib/kettle/dev/readme_backers.rb', line 33

def website
  @website
end