diff --git a/lib/github/nippou.rb b/lib/github/nippou.rb index fff95cd..6a78cd3 100644 --- a/lib/github/nippou.rb +++ b/lib/github/nippou.rb @@ -1,4 +1,5 @@ require 'github/nippou/concern/sawyer_resource_github' +require 'github/nippou/concern/string_markdown' require 'github/nippou/commands' require 'github/nippou/user_events' diff --git a/lib/github/nippou/commands.rb b/lib/github/nippou/commands.rb index ce5cd3c..ba557c5 100644 --- a/lib/github/nippou/commands.rb +++ b/lib/github/nippou/commands.rb @@ -1,18 +1,10 @@ require 'thor' -module StringExMarkdown - refine String do - def markdown_escape - self.gsub(/([`<>])/, '\\\\\1') - end - end -end - module Github module Nippou class Commands < Thor using SawyerResourceGithub - using StringExMarkdown + using StringMarkdown default_task :list class_option :since_date, type: :string, diff --git a/lib/github/nippou/concern/string_markdown.rb b/lib/github/nippou/concern/string_markdown.rb new file mode 100644 index 0000000..9ffe2f1 --- /dev/null +++ b/lib/github/nippou/concern/string_markdown.rb @@ -0,0 +1,7 @@ +module StringMarkdown + refine String do + def markdown_escape + self.gsub(/([`<>])/, '\\\\\1') + end + end +end