Class: Knife::Clc::IpAssignment::Validator

Inherits:
Object
  • Object
show all
Defined in:
lib/knife-clc/ip_assignment/validator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Validator

Returns a new instance of Validator.



7
8
9
10
# File 'lib/knife-clc/ip_assignment/validator.rb', line 7

def initialize(params)
  @config = params.fetch(:config)
  @errors = params.fetch(:errors)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



5
6
7
# File 'lib/knife-clc/ip_assignment/validator.rb', line 5

def config
  @config
end

#errorsObject (readonly)

Returns the value of attribute errors.



5
6
7
# File 'lib/knife-clc/ip_assignment/validator.rb', line 5

def errors
  @errors
end

Instance Method Details

#validateObject



12
13
14
15
# File 'lib/knife-clc/ip_assignment/validator.rb', line 12

def validate
  parse_protocol_permissions
  parse_sources
end