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 Channel < ActiveRecord::Base | |
include 'singleton' | |
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 Earth | |
include Singleton | |
end | |
a, b = Earth.instance, Earth.instance | |
a == b | |
#=> true | |
Earth.new |
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 verified | |
source.try(:verified) | |
end | |
delegate :verified, :to => :source, :allow_nil => true |
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
- (void)startStandardUpdates | |
{ | |
if (nil == locationManager) | |
locationManager = [[CLLocationManager alloc] init]; | |
locationManager.delegate = self; | |
locationManager.desiredAccuracy = kCLLocationAccuracyKilometer; | |
locationManager.distanceFilter = 10; | |
[locationManager startUpdatingLocation]; | |
} |
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 Car | |
attr_accessor :engine | |
delegate :start, :stop, :to => :engine | |
def initialize(engine) | |
@engine = engine | |
end | |
end | |
class Engine |
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 Car | |
attr_accessor :engine | |
def initialize(engine) | |
@engine = engine | |
end | |
def start_engine | |
@engine.start | |
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
class Car | |
attr_accessor :engine | |
def initialize(engine) | |
@engine = engine | |
end | |
def start_engine | |
@engine.start | |
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
java.lang.SecurityException: class "json.ext.Parser$s_method_0_1$RUBYINVOKER$newInstance"'s signer information does not match signer information of other classes in the same package | |
at java.lang.ClassLoader.checkCerts(ClassLoader.java:807) | |
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488) | |
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626) | |
at java.lang.ClassLoader.defineClass(ClassLoader.java:616) | |
at org.jruby.util.JRubyClassLoader.defineClass(JRubyClassLoader.java:22) | |
at org.jruby.internal.runtime.methods.InvocationMethodFactory.endClass(InvocationMethodFactory.java:1281) | |
at org.jruby.internal.runtime.methods.InvocationMethodFactory.getAnnotatedMethodClass(InvocationMethodFactory.java:755) | |
at org.jruby.internal.runtime.methods.InvocationMethodFactory.getAnnotatedMethod(InvocationMethodFactory.java:685) | |
at org.jruby.RubyModule.defineAnnotatedMethod(RubyModule.java:794) |
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 list | |
session[:total_sources] ||= Source.count | |
session[:source_search_params] ||= {} | |
@search_params = session[:source_search_params] | |
filter_list() | |
end |