https://www.djangoproject.com/
http://www.springsource.org/documentation
http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/
| # Written by Michael Feathers July 10th, 2020 | |
| class Command | |
| def run line, session | |
| return unless matches? line | |
| process line, session | |
| end | |
| end | |
| class FixView < Command |
| using UnityEngine; | |
| public class JumpingCharacterControllerExample : MonoBehaviour | |
| { | |
| [SerializeField] private float jumpHeight; | |
| [SerializeField] private float timeToReachJumpApex; | |
| private Vector3 _velocity; | |
| private Vector3 _oldVelocity; |
| lambda { | |
| setups = [] | |
| events = {} | |
| Kernel.send :define_method, :event do |name, &block| | |
| events[name] = block | |
| end | |
| Kernel.send :define_method, :setup do |&block| | |
| setups << block |
| $stack, $draws = [], {} | |
| def method_missing *args | |
| return if args[0][/^to_/] | |
| $stack << args.map { |a| a or $stack.pop } | |
| $draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
| end | |
| class Array | |
| def +@ |
| # ===================== | |
| # Spell: Symbol to Proc | |
| # ===================== | |
| # Convert a symbol to a block that calls a single method. | |
| [1, 2, 3, 4].map(&:even?) # => [false, true, false, true] | |
| # For more information: http://www.pragprog.com/titles/ppmetr/metaprogramming-ruby |
| # ================= | |
| # Spell: Self Yield | |
| # ================= | |
| # Pass self to the current block. | |
| class Person | |
| attr_accessor :name, :surname | |
| def initialize |
| # ================= | |
| # Spell: Scope Gate | |
| # ================= | |
| # Isolate a scope with the class, module, or def keyword. | |
| a = 1 | |
| defined? a # => "local-variable" | |
| module MyModule |
| # ============== | |
| # Spell: Sandbox | |
| # ============== | |
| # Execute untrusted code in a safe environment. | |
| def sandbox(&code) | |
| proc { | |
| $SAFE = 2 | |
| yield |