Class: DiceBag::Warning

Inherits:
Object
  • Object
show all
Defined in:
lib/dice_bag/warning.rb

Instance Method Summary collapse

Constructor Details

#initialize(template_filename) ⇒ Warning

Returns a new instance of Warning.


4
5
6
# File 'lib/dice_bag/warning.rb', line 4

def initialize(template_filename)
  @template_filename = template_filename
end

Instance Method Details

#as_ruby_commentObject Also known as: as_yaml_comment


8
9
10
# File 'lib/dice_bag/warning.rb', line 8

def as_ruby_comment
  lines.map {|line| "# #{line}\n" }.join
end

#as_xml_commentObject


14
15
16
# File 'lib/dice_bag/warning.rb', line 14

def as_xml_comment
  ['<!--', lines, '-->'].flatten.join("\n")
end