Class: Bifrossht::Config::HostFilter
- Defined in:
- lib/bifrossht/config/host_filter.rb
Instance Method Summary collapse
- #domains ⇒ Object
-
#initialize(options = {}) ⇒ HostFilter
constructor
A new instance of HostFilter.
- #prefixes ⇒ Object
- #type ⇒ Object
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( = {}) super validate_presence 'type', 'domains' validate_type 'type', String validate_type 'domains', Array validate_type 'prefixes', Array end |
Instance Method Details
#domains ⇒ Object
17 18 19 |
# File 'lib/bifrossht/config/host_filter.rb', line 17 def domains @options['domains'] || [] end |
#prefixes ⇒ Object
21 22 23 |
# File 'lib/bifrossht/config/host_filter.rb', line 21 def prefixes @options['prefixes'] || [] end |
#type ⇒ Object
13 14 15 |
# File 'lib/bifrossht/config/host_filter.rb', line 13 def type @options['type'] end |