Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
# this is the show.controller file | |
@Arc.module "MapApp.Show", (Show, App, Backbone, Marionette, $, _) -> | |
# the show controller method is public so we can access it | |
Show.Controller = | |
init: () -> | |
@getZones() | |
showMap: (map_view)-> |
def send_payment | |
encounter = Encounter.find(self.encounter_id) | |
office = Admin.find(encounter.office_id) | |
bank_account = Balanced::BankAccount.fetch(office.bank_uri) | |
begin | |
credit = bank_account.credit( | |
:amount => self.amount.to_i * 100, | |
:description => 'Payment For '+encounter.title | |
) | |
set_paid_status |
In the following post I would like to introduce one way how you can setup your testing workflow for JavaScript development. The central components in the testing environment are Grunt, Mocha and Chai that I will cover from the introduction and installation of each component to the cooperation of all components for the execution of tests.
If you are already an experienced Grunt user and just look for the Gruntfile.js and the Mocha / Chai setup just skip the central components section and skip to the installing components part.
You can find the sample project with all code at GitHub on: https://github.com/maicki/sample-js-testing-grunt-mocha-chai
(function() { | |
// code | |
}()); | |
// OR | |
(function() { | |
// code | |
})(); |
var IceIceBaby = (function(window, $, undefined) { | |
/* | |
For clarity when you see this being referenced, in this instance its referencing | |
a new object that was created when the new keyword was called. The new object | |
will have the init function and the stop function on it. | |
*/ | |
var VanillaIce = function() { |
class PaymentGateway | |
def initialize(customer, gatewayCustomer = Balanced::Customer) | |
@GatewayCustomer = gatewayCustomer | |
@customer = customer | |
end | |
def customer | |
#return @GatewayCustomer.find(@customer.customer_uri) if @customer.customer_uri | |
# if balanced customer doesn't already exist... lets make one |
using System; | |
namespace HelloWorld | |
{ | |
class Hello | |
{ | |
static void Main() | |
{ | |
Console.WriteLine("Hello World!"); | |
// Keep the console window open in debug mode. |
(function() { | |
console.log('Hello World'); | |
})(); |
module HelloWorld | |
def self.hello | |
puts 'Hello World' | |
end | |
end | |
require "./helloWorld" | |
helloWorld.hello() | |
# or |