diff --git a/lib/gzr/commands/permission/ls.rb b/lib/gzr/commands/permission/ls.rb index 59c4046..3d321e8 100644 --- a/lib/gzr/commands/permission/ls.rb +++ b/lib/gzr/commands/permission/ls.rb @@ -49,11 +49,8 @@ def execute(input: $stdin, output: $stdout) table_hash = Hash.new fields = field_names('permission,parent,description') 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|