Class: BBCDataService::AppFixture

Inherits:
Hash
  • Object
show all
Defined in:
lib/bbc_data_service/app_fixture.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.find_by_endpoint(endpoint) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/bbc_data_service/app_fixture.rb', line 13

def self.find_by_endpoint(endpoint)
  @fixtures.each do |f|
    if f.last[:endpoint] == endpoint
      return f.last
    end
  end
end

.fixturesObject



21
22
23
# File 'lib/bbc_data_service/app_fixture.rb', line 21

def self.fixtures
  @fixtures
end

.register_fixture(name, mapping) ⇒ Object



8
9
10
11
# File 'lib/bbc_data_service/app_fixture.rb', line 8

def self.register_fixture(name, mapping)
  @fixtures ||= AppFixture.new
  @fixtures[name] = mapping
end

Instance Method Details

#initalizeObject



4
5
6
# File 'lib/bbc_data_service/app_fixture.rb', line 4

def initalize
  @app_fixtures = {}
end