Class: Md2Pdf::TemplateLocation
- Inherits:
-
Struct
- Object
- Struct
- Md2Pdf::TemplateLocation
- Defined in:
- lib/md2pdf/template.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
Returns the value of attribute location.
Instance Method Summary collapse
Instance Attribute Details
#location ⇒ Object
Returns the value of attribute location
40 41 42 |
# File 'lib/md2pdf/template.rb', line 40 def location @location end |
Instance Method Details
#contains?(path) ⇒ Boolean
44 45 46 |
# File 'lib/md2pdf/template.rb', line 44 def contains?(path) File.exists?(path_for(path)) end |
#list ⇒ Object
47 48 49 |
# File 'lib/md2pdf/template.rb', line 47 def list Dir[File.join(location,"*")].map {|f| File.basename(f)} end |
#path_for(path) ⇒ Object
41 42 43 |
# File 'lib/md2pdf/template.rb', line 41 def path_for(path) File.join(location, path) end |