lib/eddy/build/transaction_set_builder.rb in eddy-0.5.0 vs lib/eddy/build/transaction_set_builder.rb in eddy-0.5.1

- old
+ new

@@ -108,13 +108,13 @@ case comp when Eddy::Schema::SegmentSummary decs << "@#{comp.id.downcase} = Eddy::Segments::#{comp.id.upcase}.new(store)\n" when Eddy::Schema::LoopSummary if comp.repeat == 1 - decs << "@#{comp.loop_id.downcase} = Eddy::Segments::#{comp.loop_id.upcase}.new(store)\n" + decs << "@#{comp.id.downcase} = Eddy::Segments::#{comp.id.upcase}.new(store)\n" else - decs << "@l_#{comp.loop_id.downcase} = Eddy::TransactionSets::#{self.summary.normalized_name}::Loops::#{comp.loop_id.upcase}.new(store)\n" + decs << "@l_#{comp.id.downcase} = Eddy::TransactionSets::#{self.summary.normalized_name}::Loops::#{comp.id.upcase}.new(store)\n" end end end return decs end @@ -127,13 +127,13 @@ case comp when Eddy::Schema::SegmentSummary super_call << " @#{comp.id.downcase},\n" when Eddy::Schema::LoopSummary if comp.repeat == 1 - super_call << " @#{comp.loop_id.downcase},\n" + super_call << " @#{comp.id.downcase},\n" else - super_call << " @l_#{comp.loop_id.downcase},\n" + super_call << " @l_#{comp.id.downcase},\n" end end end super_call << ")" return super_call @@ -147,11 +147,11 @@ case comp when Eddy::Schema::SegmentSummary Eddy::Build::TransactionSetBuilder.segment_accessor(comp.id) when Eddy::Schema::LoopSummary if comp.repeat == 1 - Eddy::Build::TransactionSetBuilder.segment_accessor(comp.loop_id) + Eddy::Build::TransactionSetBuilder.segment_accessor(comp.id) else Eddy::Build::TransactionSetBuilder.loop_accessor(comp, self.summary.normalized_name) end end end @@ -177,12 +177,12 @@ # @param summary [Eddy::Schema::LoopSummary] # @param t_set_name [String] # @return [String] def self.loop_accessor(summary, t_set_name) - upper = summary.loop_id.upcase - lower = summary.loop_id.downcase + upper = summary.id.upcase + lower = summary.id.downcase return <<~RB.strip # (see Eddy::TransactionSets::#{t_set_name}::Loops::#{upper}) # #{self.loop_components(summary, t_set_name)} # @return [void] @@ -205,10 +205,10 @@ summary.components.each do |comp| case comp when Eddy::Schema::SegmentSummary comps << "# @yieldparam [Eddy::Segments::#{comp.id.upcase}] #{comp.id.downcase}" when Eddy::Schema::LoopSummary - comps << "# @yieldparam [Eddy::TransactionSets::#{t_set_name}::Loops::#{comp.loop_id.upcase}] l_#{comp.loop_id.downcase}" + comps << "# @yieldparam [Eddy::TransactionSets::#{t_set_name}::Loops::#{comp.id.upcase}] l_#{comp.id.downcase}" end end return comps.join("\n") end