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
- #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 ||= YAML.load_file(CONFIG_PATH) end |
#credentials=(credentials) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/open_source/license/owner.rb', line 6 def credentials=(credentials) config_file = File.new(CONFIG_PATH, 'w') file_contents = YAML.dump(credentials) config_file.write(file_contents) rescue StandardError => ex OpenSource.logger.fatal("Unable to access #{CONFIG_PATH}") end |
#email ⇒ Object
18 19 20 |
# File 'lib/open_source/license/owner.rb', line 18 def 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
26 27 28 |
# File 'lib/open_source/license/owner.rb', line 26 def name credentials[:name] end |