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
# Add the folder you choose in your config/application.rb | |
# example: | |
# config.autoload_paths << Rails.root.join('app/solargraph') | |
gen_directory = Rails.root.join("app", "solargraph") | |
# run the script as a rails runner: | |
# bundle exec rails r ./bin/generate_solar_models.rb | |
type_translation = { | |
decimal: "Decimal", |
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
#!/usr/bin/env ruby | |
class LSystem | |
attr_accessor :axiom | |
attr_accessor :rules | |
def initialize(axiom, rules) | |
@axiom = axiom | |
@rules = rules | |
@layer = [axiom] |
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
namespace MyGame | |
{ | |
/// <summary> | |
/// The drawing class helps to manage shapes on a canvas. | |
/// There are helper methods like AddShape, SelectShapeAtPoint etc. | |
/// The drawing class can also draw all of the shapes that it contains. | |
/// </summary> | |
public class Drawing | |
{ | |
/// <summary> |