Class: LicenseFinder::License::Template
- Inherits:
-
Object
- Object
- LicenseFinder::License::Template
- Defined in:
- lib/license_finder/license/template.rb
Constant Summary collapse
- TEMPLATE_PATH =
ROOT_PATH.join('license', 'templates')
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(raw_content) ⇒ Template
constructor
A new instance of Template.
Constructor Details
#initialize(raw_content) ⇒ Template
Returns a new instance of Template.
14 15 16 |
# File 'lib/license_finder/license/template.rb', line 14 def initialize(raw_content) @content = Text.normalize_punctuation(raw_content) end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
12 13 14 |
# File 'lib/license_finder/license/template.rb', line 12 def content @content end |
Class Method Details
.named(name) ⇒ Object
8 9 10 |
# File 'lib/license_finder/license/template.rb', line 8 def self.named(name) new TEMPLATE_PATH.join("#{name}.txt").read end |