Class: ComfyConf::Checker

Inherits:
Object
  • Object
show all
Defined in:
lib/comfy_conf/checker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(definition, given_prefix, data) ⇒ Checker

Returns a new instance of Checker.



3
4
5
# File 'lib/comfy_conf/checker.rb', line 3

def initialize(definition, given_prefix, data)
  @definition, @given_prefix, @data = definition, given_prefix, data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



6
7
8
# File 'lib/comfy_conf/checker.rb', line 6

def data
  @data
end

#definitionObject (readonly)

Returns the value of attribute definition.



6
7
8
# File 'lib/comfy_conf/checker.rb', line 6

def definition
  @definition
end

Instance Method Details

#checkObject



8
9
10
11
# File 'lib/comfy_conf/checker.rb', line 8

def check
  definition.props.each {|p| check_prop(p) }
  definition.configs.each {|c| check_config(c) }
end

#prefixObject



13
14
15
# File 'lib/comfy_conf/checker.rb', line 13

def prefix
  given_prefix
end