Module: DnsMock::Error::Helper
- Defined in:
- lib/dns_mock/error/helper.rb
Instance Method Summary collapse
- #raise_record_context_type_error(record_type, record_context, expected_type) ⇒ Object
- #raise_record_type_error(record_type, condition) ⇒ Object
Instance Method Details
#raise_record_context_type_error(record_type, record_context, expected_type) ⇒ Object
6 7 8 9 |
# File 'lib/dns_mock/error/helper.rb', line 6 def raise_record_context_type_error(record_type, record_context, expected_type) current_type, record_type = record_context.class, record_type.upcase raise_unless(DnsMock::Error::RecordContextType.new(current_type, record_type, expected_type), current_type.eql?(expected_type)) end |
#raise_record_type_error(record_type, condition) ⇒ Object
11 12 13 |
# File 'lib/dns_mock/error/helper.rb', line 11 def raise_record_type_error(record_type, condition) raise_unless(DnsMock::Error::RecordType.new(record_type), condition) end |