Class: OsCtld::Assets::UnixSocket
- Defined in:
- lib/osctld/assets/unix_socket.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from BaseFile
#exist?, #initialize, #mode, #stat
Methods inherited from Base
#add_error, #initialize, register, #state, type, #type, #validate, #validate?
Constructor Details
This class inherits a constructor from OsCtld::Assets::BaseFile
Instance Method Details
#valid? ⇒ Boolean
7 8 9 10 11 12 13 14 |
# File 'lib/osctld/assets/unix_socket.rb', line 7 def valid? add_error('not a socket') if exist? && !opts[:optional] && !stat.socket? super rescue Errno::ENOENT add_error('does not exist') false end |