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 'rspec', '~> 3.10' | |
end | |
module Calc | |
extend self |
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', '~> 2.6.0' | |
end | |
class Add3 < Micro::Case | |
attributes :number |
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 'minitest' , '~> 5.14', '>= 5.14.2' | |
end | |
module Calc | |
extend self |
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(true) do | |
source 'https://rubygems.org' | |
gem 'pry', '~> 0.13.1' | |
gem 'rails', '~> 6.0', '>= 6.0.3.4' | |
gem 'sqlite3', '~> 1.4', '>= 1.4.2' | |
gem 'u-authorization', '~> 2.3' | |
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 'securerandom' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'u-observers', '~> 2.2.1' | |
end | |
class DoSomethingWithFiles | |
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 'benchmark-ips' | |
end | |
Benchmark.ips do |x| | |
x.config(time: 5, warmup: 2) |
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 'minitest' , '~> 5.14', '>= 5.14.2' | |
end | |
module Calc | |
IsANumericStr = -> val { val.is_a?(String) && val =~ /((\d+)?\.\d|\d+)/ } |
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 'sinatra' , '~> 2.1' , require: 'sinatra/base' | |
gem 'sqlite3' , '~> 1.4', '>= 1.4.2' | |
gem 'activerecord', '~> 6.0', '>= 6.0.3.4', require: 'active_record' | |
gem 'minitest' , '~> 5.14', '>= 5.14.2' |
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 'pp' | |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'pry-byebug' | |
gem 'awesome_print' | |
gem 'activesupport', require: 'active_support/all' | |
gem 'activemodel' |
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) |