module MkRepo::Validator::Validations
Attributes
namespace[R]
opts[RW]
Public Class Methods
new(namespace, opts)
click to toggle source
# File lib/mk_repo/validator.rb, line 19 def initialize(namespace, opts) @namespace = namespace @opts = opts end
Public Instance Methods
validate!()
click to toggle source
# File lib/mk_repo/validator.rb, line 24 def validate! required_attributes.each { |attr| public_send("validate_#{attr}") } opts end
Private Instance Methods
error_message(key, short)
click to toggle source
# File lib/mk_repo/validator.rb, line 45 def error_message(key, short) <<~ERROR Please provide a #{key} with `-#{short}', `--#{key}'. Alternatively, you can set the #{key} with \ `git config --global #{namespace}.#{key} YOUR_#{key.upcase}_HERE' ERROR end