%title: Splats: beyond *args %author: weapp %date: 2017-04-20
-> # What is * (splat) <-
%title: Splats: beyond *args %author: weapp %date: 2017-04-20
-> # What is * (splat) <-
| source "https://rubygems.org" | |
| gem "foxy" | |
| group :development, :test do | |
| gem "pry" | |
| gem "pry-byebug" | |
| end |
| defmodule PROJECT_NAME.MODULE_NAMETest do | |
| use ExUnit.Case | |
| alias PROJECT_NAME.MODULE_NAME | |
| doctest MODULE_NAME | |
| describe "description" do | |
| setup do | |
| %{ |
| class Field | |
| attr_accessor :name, :type, :default | |
| def initialize(name, type, default) | |
| @name = name.to_s | |
| @type = type | |
| @default = default | |
| end | |
| TYPECASTS = { |
| #!/usr/bin/env ruby | |
| require "bundler/inline" | |
| gemfile do | |
| source "https://rubygems.org" | |
| gem "rack" | |
| gem "foxy", git: "git://github.com/weapp/foxyrb.git" | |
| end | |
| class App |
| #!/usr/bin/env ruby | |
| #/ Usage: <progname> [options]... | |
| #/ How does this script make my life easier? | |
| # ** Tip: use #/ lines to define the --help usage message. | |
| $stderr.sync = true | |
| require 'optparse' | |
| # default options | |
| flag = false | |
| option = "default value" |
| ruby '2.7.1' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
| # Action Text | |
| gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
| gem 'okra', github: 'basecamp/okra' | |
| # Drivers |
| source 'https://rubygems.org' | |
| # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
| gem 'rails', '~> 6.0.0' | |
| # Shorten boot time | |
| gem 'bootsnap' | |
| # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder | |
| gem 'jbuilder', github: 'rails/jbuilder' |