begin

 # 예외가 발생할 가능성이 있는 문구

rescue => e

 # 적절한 예외 처리

else

 # 예외 발생없이 정상 처리

ensure

 # 예외 발생과 상관없이 처리

end

 

======================================================

json 파일을 읽어서 elasticsearch client를 셋업해보자

'언어 > Ruby' 카테고리의 다른 글

logstash ruby filter elasticsearch bulk insert  (0) 2020.07.22
ruby + elasticsearch indices/ health  (0) 2020.07.02
ruby elasticsearch client  (0) 2020.05.26
cea(ver3)  (0) 2016.02.27
class  (0) 2016.02.27