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.4.27 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.4 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.26 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.3 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.25 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.2 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.24 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.1 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.23 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.22 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.0 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.21 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.5.0.beta.1 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.20 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.19 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.18 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.17 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.16 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.15 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb
workarea-core-3.4.14 lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb