Module: Brutal::File

Defined in:
lib/brutal/file.rb,
lib/brutal/file/read.rb,
lib/brutal/file/write.rb

Overview

Brutal::File

Defined Under Namespace

Classes: Read, Write

Constant Summary collapse

DEFAULT_CONFIG_FILENAME =
".brutal.yml"
DEFAULT_GENERATED_FILENAME =
"test.rb"

Class Method Summary collapse

Class Method Details

.generated_filename(filename) ⇒ Object



14
15
16
17
18
# File 'lib/brutal/file.rb', line 14

def self.generated_filename(filename)
  return DEFAULT_GENERATED_FILENAME if filename == DEFAULT_CONFIG_FILENAME

  filename.gsub(/.[^.]+\z/, ".rb")
end