Class: Legendary::Formatters::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/legendary/formatters/base.rb

Direct Known Subclasses

Html

Instance Method Summary collapse

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_gemsObject



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_pathObject



10
11
12
# File 'lib/legendary/formatters/base.rb', line 10

def template_path
  File.expand_path(File.join(File.dirname(__FILE__), '../templates/'))
end