Class: Legendary::Formatters::Base
- Inherits:
-
Object
- Object
- Legendary::Formatters::Base
- Defined in:
- lib/legendary/formatters/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(infos) ⇒ Base
constructor
A new instance of Base.
- #sorted_gems ⇒ Object
- #template_path ⇒ Object
Constructor Details
#initialize(infos) ⇒ Base
Returns a new instance of Base.
2 3 4 |
# File 'lib/legendary/formatters/base.rb', line 2 def initialize(infos) @infos = infos end |
Instance Method Details
#sorted_gems ⇒ Object
6 7 8 |
# File 'lib/legendary/formatters/base.rb', line 6 def sorted_gems @infos.sort{ |a, b| a.name.downcase <=> b.name.downcase } end |
#template_path ⇒ Object
10 11 12 |
# File 'lib/legendary/formatters/base.rb', line 10 def template_path File.(File.join(File.dirname(__FILE__), '../templates/')) end |