Class: Webspicy::Configuration::SingleYmlFile::SingleYmlFileScope

Inherits:
Webspicy::Configuration::Scope show all
Defined in:
lib/webspicy/configuration/single_yml_file.rb

Instance Attribute Summary collapse

Attributes inherited from Webspicy::Configuration::Scope

#config

Instance Method Summary collapse

Methods inherited from Webspicy::Configuration::Scope

#data_system, #each_counterexamples, #each_example, #each_generated_counterexamples, #each_service, #each_testcase, #find_test_case, #get_client, #parse_schema, #to_real_url

Constructor Details

#initialize(config, file) ⇒ SingleYmlFileScope

Returns a new instance of SingleYmlFileScope.



7
8
9
10
# File 'lib/webspicy/configuration/single_yml_file.rb', line 7

def initialize(config, file)
  super(config)
  @file = file
end

Instance Attribute Details

#fileObject (readonly)

Returns the value of attribute file.



11
12
13
# File 'lib/webspicy/configuration/single_yml_file.rb', line 11

def file
  @file
end

Instance Method Details

#each_specification(*args) {|config.factory.specification(file.read, nil, self)| ... } ⇒ Object

Yields:

  • (config.factory.specification(file.read, nil, self))


18
19
20
21
# File 'lib/webspicy/configuration/single_yml_file.rb', line 18

def each_specification(*args, &bl)
  return enum_for(:each_specification) unless block_given?
  yield config.factory.specification(file.read, nil, self)
end

#each_specification_file(*args) {|file| ... } ⇒ Object

Yields:



13
14
15
16
# File 'lib/webspicy/configuration/single_yml_file.rb', line 13

def each_specification_file(*args, &bl)
  return enum_for(:each_specification_file) unless block_given?
  yield(file)
end