class Docker::Template::CLI::Run
Public Class Methods
new(args, opts)
click to toggle source
# File lib/docker/template/cli/run.rb, line 9 def initialize(args, opts) @opts = Meta.new(opts || {}) @repos = Parser.new(args, opts || {}).parse @args = args end
Public Instance Methods
start()
click to toggle source
–
# File lib/docker/template/cli/run.rb, line 17 def start _profile do @repos.tap do |o| o.map do |r| r.template $stdout.puts( r.tmpdir ) end end end end
Private Instance Methods
_profile() { || ... }
click to toggle source
– rubocop:enable Metrics/AbcSize –
# File lib/docker/template/cli/run.rb, line 35 def _profile return yield unless @opts.profile? Template._require "memory_profiler" do profiler = MemoryProfiler.report(:top => 10_240) { yield } profiler.pretty_print({ :to_file => "profile.txt" }) end end