app_name
app_name
AppName is a class to get or guess application name. It may be usable, for example, in OptionParser or Logger instances properties.
AppName tries to provide best result in all situations, but it may be mistaken. Feel free to create an issue is this is your case.
Installation
-
Add the dependency to your
shard.yml
:dependencies: app_name: github: DRVTiny/app_name
-
Run
shards install
Usage
require "app_name"
app = AppName.new
puts app.name
# or simply so:
puts AppName.exec_name
# you may also set application name yourself:
app.name = "Rogneda"
puts app.name
# AppName instance will be stringified to <<app [process_id]>>
puts app
# will be printed something like this:
# Rogneda [1234]
Development
TODO: Write development instructions here
Contributing
- Fork it (https://github.com/DRVTiny/app_name/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Andrey A. Konovalov - creator and maintainer
Repository
app_name
Owner
Statistic
- 0
- 0
- 0
- 3
- 0
- over 2 years ago
- December 13, 2019
License
MIT License
Links
Synced at
Mon, 23 Dec 2024 03:35:19 GMT
Languages