To get started with Rails we need to install the gem. From the terminal type:
{% terminal %}
$ gem install rails
Fetching: i18n-0.6.1.gem (100%)
Fetching: multi_json-1.3.6.gem (100%)
Fetching: activesupport-3.2.8.gem (100%)
...
{% endterminal %}
To get started with Rails we need to install the gem. From the terminal type:
{% terminal %}
$ gem install rails
Fetching: i18n-0.6.1.gem (100%)
Fetching: multi_json-1.3.6.gem (100%)
Fetching: activesupport-3.2.8.gem (100%)
...
{% endterminal %}
| require 'ruby-processing' | |
| class Board | |
| def positions | |
| @positions ||= [ [], [], [] ] | |
| end | |
| def at(x,y) | |
| positions[x][y] |
| require 'ruby-processing' | |
| class Board | |
| def positions | |
| @positions ||= [ [], [], [] ] | |
| end | |
| def at(x,y) | |
| positions[x][y] |
| require 'ruby-processing' | |
| class Board | |
| def positions | |
| @positions ||= [ [], [], [] ] | |
| end | |
| def at(x,y) | |
| positions[x][y] |
| class MyPresenter < OpenStruct | |
| end |
| module Finders | |
| def find_by(*attributes) | |
| attributes.each do |attribute| | |
| define_method("find_by_#{attribute}") do |criteria| | |
| puts "Finding by #{attribute} with #{criteria}" | |
| all.find{|c| c.send(attribute).to_s == criteria.to_s} | |
| end | |
| end | |
| end | |
| end |
| [:a,:b,:c].reverse_each.with_index do |item,index| | |
| puts "#{item} #{index}" | |
| end | |
| # c 0 | |
| # b 1 | |
| # a 2 | |
| module Enumerable | |
| def each_with_reverse_index |
| # require "frank_logger/version" | |
| require 'delegate' | |
| require 'log4r' | |
| module FrankLogger | |
| class Logger < SimpleDelegator | |
| def self.[](logname) | |
| new(Log4r::Logger.new(logname)) | |
| end |
| $ spree install --auto-accept | |
| gemfile spree | |
| gemfile spree_gateway | |
| gemfile spree_auth_devise | |
| run bundle install from "." | |
| https://github.com/spree/spree_gateway.git (at master) is not checked out. Please run `bundle install` | |
| ~/mystore/ ruby-2.0.0 | |
| $ bundle install | |
| Updating https://github.com/spree/spree_gateway.git |
| <?xml version="1.0" encoding="utf-8"?> | |
| <Options> | |
| <Game> | |
| <HideCursor>true</HideCursor> | |
| <MinimapOpacity>0.5</MinimapOpacity> | |
| <PickupTexts>true</PickupTexts> | |
| <DamageTexts>true</DamageTexts> | |
| </Game> | |
| <Graphics> | |
| <AmbientOcclusion>true</AmbientOcclusion> |