lib/fcb.rb in markdown_exec-2.0.6 vs lib/fcb.rb in markdown_exec-2.0.7
- old
+ new
@@ -1,9 +1,24 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
# encoding=utf-8
+class Hash
+ # block name in commands and documents
+ def pub_name
+ fetch(:nickname, nil) || fetch(:oname, nil)
+ end
+end
+# require 'ostruct'
+
+# class BlkS < OpenStruct
+# # Method to fetch the value associated with the attribute :nickname or :oname
+# def pub_name
+# self.nickname || self.oname
+# end
+# end
+
module MarkdownExec
class Error < StandardError; end
# Fenced Code Block (FCB)
#