Class: Aef::Hosts::EmptyElement

Inherits:
Element
  • Object
show all
Defined in:
lib/hosts/aef/hosts/empty_element.rb

Overview

Represents an empty line as element of a hosts file

Instance Attribute Summary

Attributes inherited from Element

#cache

Instance Method Summary collapse

Methods inherited from Element

#cache_filled?, #inspect, #invalidate_cache!, #to_s

Constructor Details

#initialize(options = {}) ⇒ EmptyElement

Initializes an empty Element

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :cache (String)

    sets a cached String representation



32
33
34
35
36
# File 'lib/hosts/aef/hosts/empty_element.rb', line 32

def initialize(options = {})
  validate_options(options, :cache)

  @cache = options[:cache].to_s unless options[:cache].nil?
end