class Brutal::File::Read

Brutal::File::Read

@since 1.1.0

Constants

NAME

Attributes

name[R]

Public Class Methods

new(name = NAME) click to toggle source
# File lib/brutal/file/read.rb, line 16
def initialize(name = NAME)
  @name = name
end

Public Instance Methods

call() click to toggle source
# File lib/brutal/file/read.rb, line 20
def call
  ::File.read(path)
rescue ::Errno::ENOENT => _e
  abort("File #{path} not found!")
end

Protected Instance Methods

path() click to toggle source
# File lib/brutal/file/read.rb, line 28
def path
  ::File.join(::Dir.pwd, name)
end