Module: EacTemplates::Sources::FsObject

Included in:
Directory, File
Defined in:
lib/eac_templates/sources/fs_object.rb

Constant Summary collapse

PATH_FOR_SEARCH_PREFIX =
::Pathname.new('')

Instance Method Summary collapse

Instance Method Details

#found?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/eac_templates/sources/fs_object.rb', line 17

def found?
  real_paths.any?
end

#pathPathname

Returns:

  • (Pathname)


22
23
24
# File 'lib/eac_templates/sources/fs_object.rb', line 22

def path
  real_paths.first
end

#path_for_search_prefixPathname

Returns:

  • (Pathname)


27
28
29
# File 'lib/eac_templates/sources/fs_object.rb', line 27

def path_for_search_prefix
  PATH_FOR_SEARCH_PREFIX
end

#to_sString

Returns:

  • (String)


32
33
34
# File 'lib/eac_templates/sources/fs_object.rb', line 32

def to_s
  "#{self.class.name}[#{path_for_search}]"
end