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)


14
15
16
# File 'lib/eac_templates/sources/fs_object.rb', line 14

def found?
  real_paths.any?
end

#pathPathname

Returns:

  • (Pathname)


19
20
21
# File 'lib/eac_templates/sources/fs_object.rb', line 19

def path
  real_paths.first
end

#path_for_search_prefixPathname

Returns:

  • (Pathname)


24
25
26
# File 'lib/eac_templates/sources/fs_object.rb', line 24

def path_for_search_prefix
  PATH_FOR_SEARCH_PREFIX
end

#to_sString

Returns:

  • (String)


29
30
31
# File 'lib/eac_templates/sources/fs_object.rb', line 29

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