Module: MkRepo::Validator::Validations

Included in:
Bitbucket, Github, Gitlab
Defined in:
lib/mk_repo/validator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#namespaceObject (readonly)

Returns the value of attribute namespace.



16
17
18
# File 'lib/mk_repo/validator.rb', line 16

def namespace
  @namespace
end

#optsObject

Returns the value of attribute opts.



17
18
19
# File 'lib/mk_repo/validator.rb', line 17

def opts
  @opts
end

Instance Method Details

#initialize(namespace, opts) ⇒ Object



19
20
21
22
# File 'lib/mk_repo/validator.rb', line 19

def initialize(namespace, opts)
  @namespace = namespace
  @opts = opts
end

#validate!Object



24
25
26
27
28
# File 'lib/mk_repo/validator.rb', line 24

def validate!
  required_attributes.each { |attr| public_send("validate_#{attr}") }

  opts
end