Class: Brutal::File::Read
- Inherits:
-
Object
- Object
- Brutal::File::Read
- Defined in:
- lib/brutal/file/read.rb
Overview
Brutal::File::Read
Instance Attribute Summary collapse
- #name ⇒ Object readonly
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(name) ⇒ Read
constructor
A new instance of Read.
Constructor Details
#initialize(name) ⇒ Read
Returns a new instance of Read.
11 12 13 |
# File 'lib/brutal/file/read.rb', line 11 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
9 10 11 |
# File 'lib/brutal/file/read.rb', line 9 def name @name end |
Instance Method Details
#call ⇒ Object
15 16 17 18 19 |
# File 'lib/brutal/file/read.rb', line 15 def call ::File.read(path) rescue ::Errno::ENOENT => _e abort "File #{path} not found!" end |