Skip to content

Commit

Permalink
fix: remove eval from lib/gzr/commands/model/ls.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
drstrangelooker committed Nov 7, 2023
1 parent b912249 commit 8d23a68
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/gzr/commands/model/ls.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,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 8d23a68

Please sign in to comment.