power v0.1.0
Power
Power provides you with macros which can ease your life by abstracting away the extra syntax.
Code example
Add this to your application's application.cr
:
require "power"
# Define nested modules to show the issue
module First::Second::Third
class Fourth; end
class Fifth; end
class Sixth; end
end
# Example with the `Power::Macros`
class Seventh
# Inculde the macros module
include Power::Macros
# Import the class access in this class
import First::Second::Third, [Fourth, Fifth, Sixth]
import First::Second::Third::Fourth, as: FourthDoppelganger
def initialize
pp Fourth.new
pp FourthDoppelganger.new
end
end
Installation
Add this to your application's shard.yml
:
dependencies:
power:
github: grkek/power
And run this command in your terminal:
shards install
Repository
power
Owner
Statistic
- 3
- 0
- 0
- 0
- 1
- about 3 years ago
- April 2, 2021
License
MIT License
Links
Synced at
Thu, 21 Nov 2024 23:48:07 GMT
Languages