Class: MultiRepo::Helpers::License
- Inherits:
-
Object
- Object
- MultiRepo::Helpers::License
- Defined in:
- lib/multi_repo/helpers/license.rb
Instance Attribute Summary collapse
-
#dry_run ⇒ Object
readonly
Returns the value of attribute dry_run.
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(repo, dry_run: false) ⇒ License
constructor
A new instance of License.
- #license ⇒ Object
- #license=(value) ⇒ Object
- #save! ⇒ Object
Constructor Details
#initialize(repo, dry_run: false) ⇒ License
Returns a new instance of License.
5 6 7 8 9 |
# File 'lib/multi_repo/helpers/license.rb', line 5 def initialize(repo, dry_run: false, **) @repo = repo @dry_run = dry_run reload end |
Instance Attribute Details
#dry_run ⇒ Object (readonly)
Returns the value of attribute dry_run.
3 4 5 |
# File 'lib/multi_repo/helpers/license.rb', line 3 def dry_run @dry_run end |
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
3 4 5 |
# File 'lib/multi_repo/helpers/license.rb', line 3 def repo @repo end |
Instance Method Details
#content ⇒ Object
18 19 20 |
# File 'lib/multi_repo/helpers/license.rb', line 18 def content @license.text end |
#license ⇒ Object
22 23 24 |
# File 'lib/multi_repo/helpers/license.rb', line 22 def license @license.key end |
#license=(value) ⇒ Object
26 27 28 |
# File 'lib/multi_repo/helpers/license.rb', line 26 def license=(value) @license = Licensee::License.new(value) end |
#save! ⇒ Object
11 12 13 14 15 16 |
# File 'lib/multi_repo/helpers/license.rb', line 11 def save! save_license! save_readme_license! reload unless dry_run true end |