Skip to content

theswedishdev/has_keyword_argument

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

A gem for use with MiniTest to check if certain keyword arguments are used

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages