Class: Milestoner::Configuration::Transformers::Gems::URI
- Inherits:
-
Object
- Object
- Milestoner::Configuration::Transformers::Gems::URI
- Defined in:
- lib/milestoner/configuration/transformers/gems/uri.rb
Overview
Conditionally updates project URI based on specification home page URL.
Instance Method Summary collapse
- #call(attributes) ⇒ Object
-
#initialize(key = :project_uri, path: "#{Pathname.pwd.basename}.gemspec") ⇒ URI
constructor
A new instance of URI.
Constructor Details
#initialize(key = :project_uri, path: "#{Pathname.pwd.basename}.gemspec") ⇒ URI
Returns a new instance of URI.
15 16 17 18 19 |
# File 'lib/milestoner/configuration/transformers/gems/uri.rb', line 15 def initialize(key = :project_uri, path: "#{Pathname.pwd.basename}.gemspec", **) @key = key @path = path super(**) end |
Instance Method Details
#call(attributes) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/milestoner/configuration/transformers/gems/uri.rb', line 21 def call attributes process attributes Success attributes rescue KeyError => error Failure step: :transform, payload: "Unable to transform #{key.inspect}, missing specifier: " \ "\"#{error.[/<.+>/]}\"." end |