Class: Kettle::Dev::ReadmeBackers::Backer
- Inherits:
-
Object
- Object
- Kettle::Dev::ReadmeBackers::Backer
- 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
Constant Summary collapse
- ROLE =
"BACKER"
Instance Attribute Summary collapse
-
#image ⇒ Object
Returns the value of attribute image.
-
#name ⇒ Object
Returns the value of attribute name.
-
#oc_index ⇒ Object
Returns the value of attribute oc_index.
-
#oc_type ⇒ Object
Returns the value of attribute oc_type.
-
#profile ⇒ Object
Returns the value of attribute profile.
-
#website ⇒ Object
Returns the value of attribute website.
Instance Method Summary collapse
-
#initialize(name: nil, image: nil, website: nil, profile: nil, oc_type: nil, oc_index: nil, **_ignored) ⇒ Backer
constructor
A new instance of Backer.
Constructor Details
#initialize(name: nil, image: nil, website: nil, profile: nil, oc_type: nil, oc_index: nil, **_ignored) ⇒ Backer
Returns a new instance of Backer.
52 53 54 55 56 57 58 59 |
# File 'lib/kettle/dev/readme_backers.rb', line 52 def initialize(name: nil, image: nil, website: nil, profile: nil, oc_type: nil, oc_index: nil, **_ignored) @name = name @image = image @website = website @profile = profile @oc_type = oc_type # "backer" or "organization" @oc_index = oc_index # Integer index within type for OC URL generation end |
Instance Attribute Details
#image ⇒ Object
Returns the value of attribute image.
50 51 52 |
# File 'lib/kettle/dev/readme_backers.rb', line 50 def image @image end |
#name ⇒ Object
Returns the value of attribute name.
50 51 52 |
# File 'lib/kettle/dev/readme_backers.rb', line 50 def name @name end |
#oc_index ⇒ Object
Returns the value of attribute oc_index.
50 51 52 |
# File 'lib/kettle/dev/readme_backers.rb', line 50 def oc_index @oc_index end |
#oc_type ⇒ Object
Returns the value of attribute oc_type.
50 51 52 |
# File 'lib/kettle/dev/readme_backers.rb', line 50 def oc_type @oc_type end |
#profile ⇒ Object
Returns the value of attribute profile.
50 51 52 |
# File 'lib/kettle/dev/readme_backers.rb', line 50 def profile @profile end |
#website ⇒ Object
Returns the value of attribute website.
50 51 52 |
# File 'lib/kettle/dev/readme_backers.rb', line 50 def website @website end |