Class: OpenSource::License::Owner
- Inherits:
-
Object
- Object
- OpenSource::License::Owner
- Defined in:
- lib/open_source/license/owner.rb
Instance Method Summary collapse
- #credentials ⇒ Object
- #credentials=(credentials) ⇒ Object
- #email ⇒ Object
- #license_email ⇒ Object
- #markdown_supported_email ⇒ Object
- #name ⇒ Object
Instance Method Details
#credentials ⇒ Object
14 15 16 |
# File 'lib/open_source/license/owner.rb', line 14 def credentials @credentials ||= load_credentials end |
#credentials=(credentials) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/open_source/license/owner.rb', line 6 def credentials=(credentials) File.open(CONFIG_PATH, 'w') do |config_file| config_file.write(YAML.dump(credentials)) end rescue SystemCallError => ex raise ConfigError, "Unable to write #{CONFIG_PATH}: #{ex.}" end |
#email ⇒ Object
18 19 20 |
# File 'lib/open_source/license/owner.rb', line 18 def email credentials[:email] end |
#license_email ⇒ Object
26 27 28 |
# File 'lib/open_source/license/owner.rb', line 26 def license_email "<#{credentials[:email]}>" end |
#markdown_supported_email ⇒ Object
22 23 24 |
# File 'lib/open_source/license/owner.rb', line 22 def markdown_supported_email "<#{credentials[:email]}>" end |
#name ⇒ Object
30 31 32 |
# File 'lib/open_source/license/owner.rb', line 30 def name credentials[:name] end |