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
class Foo | |
def public_function | |
# do stuff | |
end | |
def private_function | |
# do stuff | |
end | |
private :private_function |
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
def update_main_artist | |
artist = artists.first | |
if rovi_artist | |
artist = Artist.create(:name => rovi_artist.name) | |
end | |
update_attribute :main_artist_id, artist.id | |
end | |
def update_main_artist |
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
def is_it_true? | |
# calculate the result | |
not result | |
end | |
def is_it_true? | |
# calculate the result | |
!result | |
end |
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
ActiveRecord::Schema.define(:version => 20120620132905) do | |
create_table "tasks", :force => true do |t| | |
t.string "name" | |
t.integer "sender_id" | |
t.integer "receiver_id" | |
end | |
create_table "users", :force => true do |t| | |
t.string "name" | |
end |
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
# application.rb | |
class ApplicationDSL | |
attr_accessor :applications | |
def initialize | |
self.applications = [] | |
end | |
def application(name, &block) | |
application = Application.new(name) |
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
# frozen_string_literal: true | |
ruby '2.5.1' | |
source "https://rubygems.org" | |
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } | |
gem "rspec" |
OlderNewer