Class: Bifrossht::Config::HostFilter

Inherits:
Element
  • Object
show all
Defined in:
lib/bifrossht/config/host_filter.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ HostFilter

Returns a new instance of HostFilter.


4
5
6
7
8
9
10
11
# File 'lib/bifrossht/config/host_filter.rb', line 4

def initialize(options = {})
  super

  validate_presence 'type', 'domains'
  validate_type 'type', String
  validate_type 'domains', Array
  validate_type 'prefixes', Array
end

Instance Method Details

#domainsObject


17
18
19
# File 'lib/bifrossht/config/host_filter.rb', line 17

def domains
  @options['domains'] || []
end

#prefixesObject


21
22
23
# File 'lib/bifrossht/config/host_filter.rb', line 21

def prefixes
  @options['prefixes'] || []
end

#typeObject


13
14
15
# File 'lib/bifrossht/config/host_filter.rb', line 13

def type
  @options['type']
end