Class: Holoserve::Pair::Loader
- Inherits:
-
Object
- Object
- Holoserve::Pair::Loader
- Defined in:
- lib/holoserve/pair/loader.rb
Instance Method Summary collapse
-
#initialize(fixture_file_pattern, pair_file_pattern, logger) ⇒ Loader
constructor
A new instance of Loader.
- #pairs ⇒ Object
Constructor Details
#initialize(fixture_file_pattern, pair_file_pattern, logger) ⇒ Loader
Returns a new instance of Loader.
6 7 8 9 10 11 12 13 |
# File 'lib/holoserve/pair/loader.rb', line 6 def initialize(fixture_file_pattern, pair_file_pattern, logger) @fixtures, @pairs = { }, { } @fixture_file_pattern, @pair_file_pattern = fixture_file_pattern, pair_file_pattern @logger = logger @validator = Holoserve::Pair::Validator.new rescue Holoserve::Pair::Validator::InvalidSchemaError => error @logger.error error.inspect end |
Instance Method Details
#pairs ⇒ Object
15 16 17 18 19 |
# File 'lib/holoserve/pair/loader.rb', line 15 def pairs load_fixtures if @fixture_file_pattern load_pairs if @pair_file_pattern @pairs end |