lib/atp/ast/builder.rb in atp-0.3.0 vs lib/atp/ast/builder.rb in atp-0.3.1

- old
+ new

@@ -2,11 +2,11 @@ module AST class Builder include Factories attr_reader :context - attr_accessor :source_file, :source_line_number + attr_accessor :source_file, :source_line_number, :description def flow n0(:flow) end @@ -25,14 +25,10 @@ def render(str) n(:render, str.to_s) end - def description(str) - n(:description, str.to_s) - end - def id(symbol) n(:id, symbol.to_sym) end def flow_flag(name, enabled, node) @@ -182,12 +178,10 @@ children << name(n) end if n = (options[:number] || options[:num] || options[:tnum] || options[:test_number]) children << number(n) end - d = options[:description] || options[:desc] - children << description(d) if d children << id(options[:id].to_s.downcase.to_sym) if options[:id] children << on_fail(options[:on_fail]) if options[:on_fail] children << on_pass(options[:on_pass]) if options[:on_pass] @@ -201,30 +195,30 @@ end def on_fail(options = {}) children = [] if options[:bin] || options[:softbin] - children << set_result(:fail, bin: options[:bin], softbin: options[:softbin], description: options[:bin_description]) + children << set_result(:fail, bin: options[:bin], softbin: options[:softbin], bin_description: options[:bin_description]) end children << continue if options[:continue] n(:on_fail, *children) end def on_pass(options = {}) children = [] if options[:bin] || options[:softbin] - children << set_result(:pass, bin: options[:bin], softbin: options[:softbin], description: options[:bin_description]) + children << set_result(:pass, bin: options[:bin], softbin: options[:softbin], bin_description: options[:bin_description]) end children << continue if options[:continue] n(:on_pass, *children) end def set_result(type, options = {}) children = [] children << type children << n(:bin, options[:bin]) if options[:bin] children << n(:softbin, options[:softbin]) if options[:softbin] - children << n(:description, options[:description]) if options[:description] + children << n(:bin_description, options[:bin_description]) if options[:bin_description] result = n(:set_result, *children) if options[:conditions] apply_conditions(result, options[:conditions]) else