Sha256: fb3d456aeaa69063ecdd06c1e9050979557f40b0dc163d6b16599327ac722686

Contents?: true

Size: 421 Bytes

Versions: 2

Compression:

Stored size: 421 Bytes

Contents

require_relative 'build_method_base'

module Verbalize
  class BuildSafeActionMethod < BuildMethodBase
    private

    def declaration
      "def self.#{method_name}(#{declaration_keyword_arguments})"
    end

    def body
      if all_keywords.empty?
        "  __verbalized_send(:#{method_name})"
      else
        "  __verbalized_send(:#{method_name}, #{initialize_keywords_and_values})"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
verbalize-1.4.1 lib/verbalize/build_safe_action_method.rb
verbalize-1.3.0 lib/verbalize/build_safe_action_method.rb