reunited some __FILE__, __LINE__ with their + 1
This commit is contained in:
parent
1e44302d1a
commit
e87c543b0f
|
@ -226,7 +226,7 @@ module CouchRest
|
|||
# end
|
||||
|
||||
name = "_conditional_callback_#{@kind}_#{next_id}"
|
||||
txt, line = <<-RUBY_EVAL, __LINE__
|
||||
txt, line = <<-RUBY_EVAL, __LINE__ + 1
|
||||
def #{name}(halted)
|
||||
#{@compiled_options[0] || "if true"} && !halted
|
||||
#{@filter} do
|
||||
|
@ -388,7 +388,7 @@ module CouchRest
|
|||
body = send("_#{symbol}_callback").
|
||||
compile(nil, :terminator => send("_#{symbol}_terminator"))
|
||||
|
||||
body, line = <<-RUBY_EVAL, __LINE__
|
||||
body, line = <<-RUBY_EVAL, __LINE__ + 1
|
||||
def _run_#{symbol}_callbacks(key = nil, &blk)
|
||||
if key
|
||||
name = "_run__\#{self.class.name.hash.abs}__#{symbol}__\#{key.hash.abs}__callbacks"
|
||||
|
|
|
@ -27,7 +27,7 @@ module CouchRest
|
|||
class IncludeError < StandardError; end
|
||||
|
||||
def self.included(base)
|
||||
base.class_eval <<-EOS, __FILE__, __LINE__
|
||||
base.class_eval <<-EOS, __FILE__, __LINE__ + 1
|
||||
extlib_inheritable_accessor(:properties) unless self.respond_to?(:properties)
|
||||
self.properties ||= []
|
||||
EOS
|
||||
|
@ -144,14 +144,14 @@ module CouchRest
|
|||
# defines the getter for the property (and optional aliases)
|
||||
def create_property_getter(property)
|
||||
# meth = property.name
|
||||
class_eval <<-EOS, __FILE__, __LINE__
|
||||
class_eval <<-EOS, __FILE__, __LINE__ + 1
|
||||
def #{property.name}
|
||||
self['#{property.name}']
|
||||
end
|
||||
EOS
|
||||
|
||||
if property.alias
|
||||
class_eval <<-EOS, __FILE__, __LINE__
|
||||
class_eval <<-EOS, __FILE__, __LINE__ + 1
|
||||
alias #{property.alias.to_sym} #{property.name.to_sym}
|
||||
EOS
|
||||
end
|
||||
|
|
|
@ -50,7 +50,7 @@ module CouchRest
|
|||
|
||||
def self.included(base)
|
||||
base.extlib_inheritable_accessor(:auto_validation)
|
||||
base.class_eval <<-EOS, __FILE__, __LINE__
|
||||
base.class_eval <<-EOS, __FILE__, __LINE__ + 1
|
||||
# Callbacks
|
||||
define_callbacks :validate
|
||||
|
||||
|
@ -74,7 +74,7 @@ module CouchRest
|
|||
EOS
|
||||
|
||||
base.extend(ClassMethods)
|
||||
base.class_eval <<-EOS, __FILE__, __LINE__
|
||||
base.class_eval <<-EOS, __FILE__, __LINE__ + 1
|
||||
define_callbacks :validate
|
||||
if method_defined?(:_run_save_callbacks)
|
||||
set_callback :save, :before, :check_validations
|
||||
|
@ -210,7 +210,7 @@ module CouchRest
|
|||
def create_context_instance_methods(context)
|
||||
name = "valid_for_#{context.to_s}?" # valid_for_signup?
|
||||
if !self.instance_methods.include?(name)
|
||||
class_eval <<-EOS, __FILE__, __LINE__
|
||||
class_eval <<-EOS, __FILE__, __LINE__ + 1
|
||||
def #{name} # def valid_for_signup?
|
||||
valid?('#{context.to_s}'.to_sym) # valid?('signup'.to_sym)
|
||||
end # end
|
||||
|
|
|
@ -21,7 +21,7 @@ module CouchRest
|
|||
|
||||
def self.inherited(subklass)
|
||||
subklass.send(:include, CouchRest::Mixins::Properties)
|
||||
subklass.class_eval <<-EOS, __FILE__, __LINE__
|
||||
subklass.class_eval <<-EOS, __FILE__, __LINE__ + 1
|
||||
def self.inherited(subklass)
|
||||
subklass.properties = self.properties.dup
|
||||
end
|
||||
|
@ -76,7 +76,7 @@ module CouchRest
|
|||
# on the document whenever saving occurs. CouchRest uses a pretty
|
||||
# decent time format by default. See Time#to_json
|
||||
def self.timestamps!
|
||||
class_eval <<-EOS, __FILE__, __LINE__
|
||||
class_eval <<-EOS, __FILE__, __LINE__ + 1
|
||||
property(:updated_at, :read_only => true, :cast_as => 'Time', :auto_validation => false)
|
||||
property(:created_at, :read_only => true, :cast_as => 'Time', :auto_validation => false)
|
||||
|
||||
|
|
Loading…
Reference in a new issue