class Voucher::SegmentsReader
Attributes
file_name[R]
Public Class Methods
call(file_name)
click to toggle source
# File lib/voucher/segments_reader.rb, line 7 def self.call(file_name) new(file_name).call end
new(file_name)
click to toggle source
# File lib/voucher/segments_reader.rb, line 11 def initialize(file_name) @file_name = file_name end
Public Instance Methods
call()
click to toggle source
# File lib/voucher/segments_reader.rb, line 15 def call read_file end
Private Instance Methods
read_file()
click to toggle source
# File lib/voucher/segments_reader.rb, line 21 def read_file path = File.expand_path(file_name) File.read(path) end