Class: EacTemplates::Sources::Single
- Defined in:
- lib/eac_templates/sources/single.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.assert(object) ⇒ EacTemplates::Sources::Single
11 12 13 14 15 |
# File 'lib/eac_templates/sources/single.rb', line 11 def assert(object) return object if object.is_a?(self) new(object.to_pathname) end |
Instance Method Details
#search(subpath) ⇒ Pathname?
23 24 25 26 |
# File 'lib/eac_templates/sources/single.rb', line 23 def search(subpath) r = path.join(subpath) r.exist? ? r : nil end |
#to_s ⇒ String
29 30 31 |
# File 'lib/eac_templates/sources/single.rb', line 29 def to_s "#{self.class.name}[#{path}]" end |