Tbpgr Blog

元エンジニア 人事 tbpgr(てぃーびー) のブログ

るりまサンプルコード追加プロジェクト年次報告 2018年 #ruby_polisher

f:id:tbpg:20180919165934p:plain

2018年のるりまへのサンプルコードの追加内容をまとめました。

経緯

るりまのサンプルコード追加に関する経緯についてはこちらの記事をご確認ください。

tbpgr.hatenablog.com

前提

  • master にマージされたものを対象にしています
  • pull request を行った日付を対象にしています
  • コミットコメントに「Add sample」を含むもののみを集計対象にしています

追加されたサンプルコード

  1. Add sample code of Class#json_creatable?
  2. Add sample code of CSV#col_sep
  3. Add sample code of CSV#converte
  4. Add sample code of CSV#converters
  5. Add sample code of CSV#encoding
  6. Add sample code of CSV#field_size_limit
  7. Add sample code of CSV#force_quotes?
  8. Add sample code of CSV#header_row?
  9. Add sample code of CSV#headers
  10. Add sample code of CSV#inspect
  11. Add sample code of CSV#lineno
  12. Add sample code of CSV#quote_char
  13. Add sample code of CSV#read
  14. Add sample code of CSV#readline
  15. Add sample code of CSV#rewind
  16. Add sample code of CSV#row_sep
  17. Add sample code of CSV#skip_blanks?
  18. Add sample code of CSV.generate
  19. Add sample code of CSV.generate_line
  20. Add sample code of CSV.new
  21. Add sample code of CSV.open
  22. Add sample code of CSV.parse
  23. Add sample code of CSV.parse_line
  24. Add sample code of CSV.read
  25. Add sample code of CSV::FieldInfo#header
  26. Add sample code of CSV::FieldInfo#index
  27. Add sample code of CSV::FieldInfo#line
  28. Add sample code of CSV::FieldInfo#line=
  29. Add sample code of CSV::Row#<<
  30. Add sample code of CSV::Row#==
  31. Add sample code of CSV::Row#=
  32. Add sample code of CSV::Row#delete
  33. Add sample code of CSV::Row#delete_if
  34. Add sample code of CSV::Row#each
  35. Add sample code of CSV::Row#field
  36. Add sample code of CSV::Row#field_row?
  37. Add sample code of CSV::Row#header?
  38. Add sample code of CSV::Row#header_row?
  39. Add sample code of CSV::Row#headers
  40. Add sample code of CSV::Row#index
  41. Add sample code of CSV::Row#inspect
  42. Add sample code of CSV::Row#to_csv
  43. Add sample code of CSV::Row#to_hash
  44. Add sample code of CSV::Row.new
  45. Add sample code of CSV::Table#<<
  46. Add Sample code of CSV::Table#=3d=3d
  47. Add sample code of CSV::Table#
  48. Add sample code of CSV::Table#=
  49. Add sample code of CSV::Table#by_col
  50. Add sample code of CSV::Table#by_col=21
  51. Add Sample code of CSV::Table#by_row
  52. Add Sample code of CSV::Table#by_row=21
  53. Add sample code of CSV::Table#delete
  54. Add sample code of CSV::Table#delete_if
  55. Add sample code of CSV::Table#each
  56. Add sample code of CSV::Table#headers
  57. Add sample code of CSV::Table#mode
  58. Add sample code of CSV::Table#to_a
  59. Add sample code of CSV::Table#values_at
  60. Add sample code of CSV::Table.new
  61. add sample code of Encoding::Converter#last_error
  62. add sample code of Encoding::Converter#putback
  63. Add sample code of Encoding::Converter's source_encoding and destination_encoding
  64. add sample code of Encoding::Converter.new
  65. Add sample code of ENV.
  66. Add sample code of ENV.clear
  67. Add sample code of ENV.store
  68. Add sample code of Exception#set_backtrace
  69. Add sample code of File#atime
  70. Add sample code of File#mtime
  71. Add sample code of File#truncate
  72. Add sample code of File.lchmod
  73. Add sample code of File.lchown
  74. Add sample code of File.readlink
  75. Add sample code of File.umask
  76. Add sample code of FileTest.#empty?
  77. Add sample code of FileTest.#executable_real?
  78. Add sample code of FileTest.#grpowned?
  79. Add sample code of FileTest.#owned?
  80. Add sample code of FileTest.#readable?
  81. Add sample code of FileTest.#readable_real?
  82. Add sample code of FileTest.#setgid?
  83. Add sample code of FileTest.#setuid?
  84. Add sample code of FileTest.#size?
  85. Add sample code of FileTest.#socket?
  86. Add sample code of FileTest.#sticky?
  87. Add sample code of FileTest.#symlink?
  88. Add sample code of FileTest.#writable?
  89. Add sample code of GC.count
  90. Add sample code of GC.disable
  91. Add sample code of GC.enable
  92. Add sample code of GC.start
  93. Add sample code of GC.stress
  94. Add sample code of GC::Profiler.report
  95. Add sample code of GC::Profiler.total_time
  96. Add sample code of IO#binmode
  97. Add sample code of IO#clone
  98. Add sample code of IO#close
  99. Add sample code of IO#close_read
  100. Add sample code of IO#close_write
  101. Add sample code of IO#closed?
  102. Add sample code of IO#each_byte
  103. Add sample code of IO#fcntl
  104. Add sample code of IO#fdatasync
  105. Add sample code of IO#fileno
  106. Add sample code of IO#flush
  107. Add sample code of IO#isatty
  108. Add sample code of IO#pid
  109. Add sample code of IO#pos
  110. Add sample code of IO#pos=
  111. Add sample code of IO#print
  112. Add sample code of IO#putc
  113. Add sample code of IO#stat
  114. Add sample code of IO#sync
  115. Add sample code of IO#syswrite
  116. Add sample code of IO.binread
  117. Add sample code of IO.binwrite
  118. Add sample code of IO.copy_stream
  119. Add sample code of IO.foreach
  120. Add sample code of IO.readlines
  121. Add sample code of IO.sysopen
  122. Add sample code of IO.write
  123. Add sample code of JSON::State#to_h
  124. Add sample code of Kernel#j
  125. Add sample code of Kernel#jj
  126. Add sample code of Kernel#JSON
  127. Add sample code of Kernel.#fork.
  128. Add sample code of Kernel.#require
  129. Add sample code of Kernel.#syscall
  130. Add sample code of Kernel.#test
  131. Add sample code of main object
  132. Add sample code of main#include
  133. Add sample code of main#private
  134. Add sample code of Math.acos
  135. Add sample code of Math.asin
  136. Add sample code of Math.atan
  137. Add sample code of Math.cbrt
  138. Add sample code of Math.cos
  139. Add sample code of Math.erf
  140. Add sample code of Math.erfc
  141. Add sample code of Math.exp
  142. Add sample code of Math.fexp
  143. Add sample code of Math.gamma
  144. Add sample code of Math.ldexp
  145. Add sample code of Math.lgamma
  146. Add sample code of Math.log
  147. Add sample code of Math.log10
  148. Add sample code of Math.log2
  149. Add sample code of Math.sin
  150. Add sample code of Math.sqrt
  151. Add sample code of Math.tan
  152. Add sample code of Module#instance_method
  153. Add sample code of Module#private_method_defined?
  154. Add sample code of NET::HTTPGenericRequest#body
  155. Add sample code of NET::HTTPGenericRequest#body=
  156. Add sample code of NET::HTTPGenericRequest#request_body_permitted
  157. Add sample code of NET::HTTPGenericRequest#response_body_permitted?
  158. Add sample code of NET::HTTPHeader#basic_auth
  159. Add sample code of NET::HTTPHeader#chunked?
  160. Add sample code of NET::HTTPHeader#method
  161. Add sample code of NET::HTTPResponse#body
  162. Add sample code of NET::HTTPResponse#code
  163. Add sample code of NET::HTTPResponse#http_version
  164. Add sample code of NET::HTTPResponse#message
  165. Add sample code of NET::HTTPResponse#read_body
  166. Add sample code of NET::HTTPResponse#value
  167. Add sample code of Object#!~
  168. Add sample code of ObjectSpace#each_object
  169. Add sample code of ObjectSpace#memsize_of
  170. Add sample code of Pathname.getwd
  171. Add sample code of Pathname.new
  172. Add sample code of RubyVM::InstructionSequence#inspect
  173. Add sample code of RubyVM::InstructionSequence#to_a
  174. Add sample code of Signal.trap
  175. Add sample code of SignalException.new
  176. Add sample code of Thread#[]
  177. Add sample code of Thread#inspect
  178. Add sample code of Thread#key?
  179. Add sample code of Thread#name=
  180. Add sample code of Thread#priority
  181. Add sample code of Thread#report_on_exception
  182. Add sample code of Thread#run
  183. Add sample code of Thread#safe_level
  184. Add sample code of Thread#stop?
  185. Add sample code of Thread#wakeup
  186. Add sample code of Thread.abort_on_exception
  187. Add sample code of Thread.DEBUG
  188. Add sample code of Thread.DEBUG=
  189. Add sample code of Thread.stop
  190. Add sample code of Thread::Mutex#synchronize
  191. Add sample code of Thread::Queue#clear
  192. Add sample code of Thread::Queue#closed?
  193. Add sample code of Thread::Queue#empty?
  194. Add sample code of Thread::Queue#length
  195. Add sample code of Thread::SizedQueue#close
  196. Add sample code of UnboundMethod#clone
  197. Add sample code of UnboundMethod#source_location
  198. Add sample code of UncaughtThrowError#tag

まとめ

  • Class
  • CSV 関連のクラス
  • Encoding::Converter
  • ENV
  • File
  • FileTest
  • GC
  • IO
  • JSON::State
  • Kernel
  • main
  • Math
  • Module
  • NET::HTTP 関連のクラス
  • Object
  • ObjectSpace
  • Pathname
  • RubyVM 関連のクラス
  • Signal
  • SignalException
  • Thread 関連のクラス
  • UnboundMethod
  • UncaughtThrowError

などの Class, Module のサンプルコードが増えました。