Module: Bgem::Output::Ext::StandardHooks
- Included in:
- RB
- Defined in:
- lib/bgem.rb
Instance Method Summary collapse
Instance Method Details
#concatenate(*patterns) ⇒ Object
62 63 64 65 66 |
# File 'lib/bgem.rb', line 62 def concatenate *patterns Dir[*patterns].sort.map do |file| Output.new(file, indent: INDENT).to_s end.join "\n\n" end |
#post ⇒ Object
54 55 56 57 58 59 60 |
# File 'lib/bgem.rb', line 54 def post patterns = ["#{@name}/*.rb", "post.#{@name}/*.rb"].map do |pattern| @dir.join pattern end concatenate *patterns end |
#pre ⇒ Object
49 50 51 52 |
# File 'lib/bgem.rb', line 49 def pre pattern = @dir.join "#{__method__}.#{@name}/*.rb" concatenate pattern end |