Skip to content

Commit

Permalink
fix: remove eval from lib/gzr/commands/attribute/ls.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
drstrangelooker committed Nov 7, 2023
1 parent 5a3e53a commit 5bc8051
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/gzr/commands/attribute/ls.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,8 @@ def execute(input: $stdin, output: $stdout)
table_hash = Hash.new
fields = field_names(@options[:fields])
table_hash[:header] = fields unless @options[:plain]
expressions = fields.collect { |fn| field_expression_hash(fn) }
table_hash[:rows] = data.map do |row|
expressions.collect do |e|
eval "row#{e}"
end
field_expressions_eval(fields,row)
end
table = TTY::Table.new(table_hash)
alignments = fields.collect do |k|
Expand Down

0 comments on commit 5bc8051

Please sign in to comment.