Sha256: 2411bfdf4199776794ca673b366d163e717fcc36b8838251d27d7ced31116560
Contents?: true
Size: 642 Bytes
Versions: 6
Compression:
Stored size: 642 Bytes
Contents
Voom::Presenters.define(:context_list) do helpers do def title context.fetch(:title) {'Context'} end def time Time.now unless context.fetch('testing') {false} end def scrubbed_context scrubbed_keys = context.fetch(:exclude) {%w{title file testing}} context.select {|k, _| !scrubbed_keys.include?(k.to_s)} end end content id: :context_list do grid do column 12 do display title subheading "#{time}" list do scrubbed_context.map {|k, v| "#{k}: #{v}"}.each do |param| line param end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems