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.



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

def initialize(template_filename)
  @template_filename = template_filename
end

Instance Method Details

#as_ruby_commentObject Also known as: as_yaml_comment



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

def as_ruby_comment
  lines.map { |line| "# #{line}".rstrip }.join("\n") + "\n"
end

#as_xml_commentObject



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

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