Class: Ayadn::SetAPI
Instance Attribute Summary
Attributes inherited from SetBase
Instance Method Summary collapse
-
#initialize ⇒ SetAPI
constructor
A new instance of SetAPI.
- #setURL(url) ⇒ Object
Methods inherited from SetBase
Constructor Details
Instance Method Details
#setURL(url) ⇒ Object
325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/ayadn/set.rb', line 325 def setURL(url) @input = url # @status.say_header "checking URL validity" url = Validators.URL(url) if url != nil @output = url.to_s @status.say_info "setting up configuration" File.write(Dir.home + "/ayadn/.api.yml", {root: @output}.to_yaml) log() else @status.say_red :canceled, "URL is invalid" exit end end |