Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1016 Bytes

README.md

File metadata and controls

36 lines (27 loc) · 1016 Bytes

has_keyword_argument?

Gem Version Gem Total downloads Gem Stable downloads License

Installation

gem install has_keyword_argument

API

#has_keyword_argument?(*keyword)

lib/main.rb

def greeting(greeting:, name:)
  return "#{greeting}, #{name}!"
end

def hello(name:)
  return "Hello #{name}"
end

test/test_main.rb

require 'has_keyword_argument'

require_relative '../lib/main'

:hello.has_keyword_argument?(:name)

:greeting.has_keyword_argument?(:greeting, :name)