Sha256: 14ec1167c2bb1d2e2c49f239a12fb241f2f23c326fafdcc609985a345f2af2ed

Contents?: true

Size: 507 Bytes

Versions: 23

Compression:

Stored size: 507 Bytes

Contents

module PowerStencil
  module Dsl

    class PluginGeneration < PowerStencil::Dsl::Base

      def plugin_name
         main_entry_point.underscore
      end

      def plugin_module_name
        plugin_name.camelize
      end

      def erb_code(ruby_code_str, skip_line = true)
        end_char = skip_line ? '-' : ''
        '%s %s %s%s' % ['<%', ruby_code_str, end_char, '%>']
      end

      def erb_insert(ruby_code_str)
        '%s %s %s' % ['<%=', ruby_code_str, '%>']
      end

    end

  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
power_stencil-0.6.0 lib/power_stencil/dsl/plugin_generation.rb
power_stencil-0.5.1 lib/power_stencil/dsl/plugin_generation.rb
power_stencil-0.5.0 lib/power_stencil/dsl/plugin_generation.rb