Skip to content

Instantly share code, notes, and snippets.

@mugyu
Last active April 17, 2021 06:32
Show Gist options
  • Save mugyu/4740c9312e70712fa52bad3ac2294fa0 to your computer and use it in GitHub Desktop.
Save mugyu/4740c9312e70712fa52bad3ac2294fa0 to your computer and use it in GitHub Desktop.
example of the gem in ruby
Gem Package
* mugyu.gemspec
* mugyu.rb
Install example gem
* Gemfile
* example.rb
$ bundle config set path 'vendor/bundle' --local
$ bundle install
$ bundle exec ruby example.rb
gem 'mugyu', git: 'https://gist.github.com/4740c9312e70712fa52bad3ac2294fa0.git'
gem 'mugyu', git: 'https://gist.github.com/4740c9312e70712fa52bad3ac2294fa0.git'
Gem::Specification.new do |spec|
spec.name = 'mugyu'
spec.version = '0.0.1'
spec.authors = ['mugyu']
spec.email = ['mugyu@example.com']
spec.summary = 'example of the gem'
spec.files = ['mugyu.rb']
spec.require_path = '.'
end
class Mugyu
def what_is_your_name
"I am mugyu. Please call me mugyu."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment