Class: Template

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#errorObject (readonly)

Returns the value of attribute error.



6
7
8
# File 'lib/template.rb', line 6

def error
  @error
end

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/template.rb', line 5

def path
  @path
end