Object
# File lib/rouge/cli.rb, line 7 def initialize(input) @input = input end
# File lib/rouge/cli.rb, line 11 def file case input when '-' $stdin when String File.new(input) when ->(i){ i.respond_to? :read } input end end
# File lib/rouge/cli.rb, line 22 def read @read ||= begin file.read rescue => e $stderr.puts "unable to open #{input}: #{e.message}" exit 1 ensure file.close end end
[Validate]
Generated with the Darkfish Rdoc Generator 2.