power

Version, currently 0.1.01 version
  • 0.1.0latestAug 29, 2021

github.com/grkek/power

Power provides you with macros which can ease your life by abstracting away the extra syntax

3 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  power:
    github: grkek/power
    version: ~> 0.1.0

Then run:

shards install

shard.yml

Crystal
1.0.0
License
MIT
Author
Giorgi Kavrelishvili

Dependencies

Development Dependencies

  • ameba*github: crystal-ameba/amebadev

README

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