module Tengine::Job::Structure::NamePath
Constants
- ABSOLUTE_PATH_REGEXP
- SEPARATOR
Public Class Methods
absolute?(name_path)
click to toggle source
# File lib/tengine/job/structure/name_path.rb, line 9 def absolute?(name_path) ABSOLUTE_PATH_REGEXP =~ name_path end
Public Instance Methods
name_path()
click to toggle source
# File lib/tengine/job/structure/name_path.rb, line 14 def name_path name = respond_to?(:name) ? self.name : self.class.name.split('::').last.underscore parent ? "#{parent.name_path}#{SEPARATOR}#{name}" : "#{SEPARATOR}#{name}" end
name_path_until_expansion()
click to toggle source
# File lib/tengine/job/structure/name_path.rb, line 20 def name_path_until_expansion name = respond_to?(:name) ? self.name : self.class.name.split('::').last.underscore if self.respond_to?(:was_expansion) && self.was_expansion "#{SEPARATOR}#{name}" else parent ? "#{parent.name_path_until_expansion}#{SEPARATOR}#{name}" : "#{SEPARATOR}#{name}" end end