Class: Template
- Inherits:
-
Object
- Object
- Template
- Defined in:
- lib/template.rb
Constant Summary collapse
- ERROR_INVALID_URL =
"You've provided an invalid URL."
- ERROR_INVALID_CONTENT =
"Your URL needs to resolve to a Thor-supported template, and can't contain things like HTML tags."
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path:) ⇒ Template
constructor
A new instance of Template.
Constructor Details
#initialize(path:) ⇒ Template
Returns a new instance of Template.
11 12 13 14 15 16 |
# File 'lib/template.rb', line 11 def initialize(path:) @path = path @error = nil validate_path end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
6 7 8 |
# File 'lib/template.rb', line 6 def error @error end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/template.rb', line 5 def path @path end |