This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'u-attributes', '~> 2.6.0' | |
| end | |
| class SumNumbers | |
| include Micro::Attributes.with(:initialize, accept: :strict) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'u-case', '~> 4.2.1' | |
| end | |
| require 'json' | |
| module ReportFormatters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Calc | |
| def sum(a, b) | |
| a + b | |
| end | |
| def multiply(a, b) | |
| a * b | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Words1 | |
| def self.foo; "foo1"; end | |
| def self.bar; "bar1"; end | |
| end | |
| module Words2 | |
| extend self | |
| private |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'u-attributes', '~> 2.6.0' | |
| end | |
| # ------------------- ------------------- | |
| class Person |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'u-case' | |
| gem 'u-observers' | |
| end | |
| class Person | |
| include Micro::Observers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'u-test' | |
| gem 'activerecord', require: 'active_record' | |
| gem 'sqlite3' | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'bundler/inline' | |
| require 'digest' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'u-attributes', '~> 2.6.0' | |
| end | |
| class Password | |
| include Micro::Attributes.with(:initialize) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'awesome_print' | |
| gem 'pry' | |
| gem 'u-case', '~> 4.0.0' | |
| gem 'activemodel', '~> 6.0' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def on(arg, spec) | |
| track, result = arg.to_a[0] | |
| type, data = result.to_a[0] | |
| hook = spec.fetch(track, {})[type] | |
| return unless hook | |
| keys = hook.parameters.map(&:last) |