Sha256: b88518751bb421a5bb7b0efdf546310ef51ccf107cad153c6248ee42f57d1a03

Contents?: true

Size: 655 Bytes

Versions: 62

Compression:

Stored size: 655 Bytes

Contents

module Workarea
  class PricingCalculatorGenerator < Rails::Generators::NamedBase
    source_root File.expand_path('../templates', __FILE__)

    def copy_calculator
      template(
        'calculator.rb.erb',
        "app/models/workarea/pricing/calculators/#{file_name}_calculator.rb"
      )
    end

    def copy_test
      template(
        'test.rb.erb',
        "test/models/workarea/pricing/calculators/#{file_name}_calculator_test.rb"
      )
    end

    def notify_of_changes
      say %{
      Review the pricing guides to learn how to customize your new calculator
      and insert it into the chain of calculators
      }
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.26 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.45 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.25 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.23 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.44 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.22 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.43 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.21 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.42 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.20 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.41 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.19 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.40 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.18 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.39 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.17 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.38 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.16 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.37 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb