Class: Adrift::Pattern::Tags::Root

Inherits:
Object
  • Object
show all
Defined in:
lib/adrift/pattern.rb

Overview

Pattern’s tag that represents the application root directory.

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.pathObject

Returns the value of attribute path.



122
123
124
# File 'lib/adrift/pattern.rb', line 122

def path
  @path
end

Instance Method Details

#labelObject

Portion of Pattern#string that will be replaced.



126
127
128
# File 'lib/adrift/pattern.rb', line 126

def label
  ':root'
end

#specializeObject

Returns Adrift::Pattern::Tags::Root.path when defined, ‘.’ otherwise.



132
133
134
# File 'lib/adrift/pattern.rb', line 132

def specialize(*)
  self.class.path || '.'
end