lib/inch/code_object/proxy/base.rb in inch-0.4.6 vs lib/inch/code_object/proxy/base.rb in inch-0.4.7

- old
+ new

@@ -1,6 +1,6 @@ -require 'forwardable' +require "forwardable" module Inch module CodeObject module Proxy # This is the base class for code object proxies. @@ -40,23 +40,23 @@ @evaluation ||= Evaluation::Proxy.for(self) end # @return [Symbol] def grade - @grade ||= Evaluation.new_grade_lists.detect { |range| - range.scores.include?(score) - }.grade + @grade ||= Evaluation.new_grade_lists.find do |range| + range.scores.include?(score) + end.grade end # @return [Boolean] if the current object is an alias for something else def alias? !aliased_object.nil? end # @return [CodeObject::Proxy::Base] the object the current object is an alias of def aliased_object - object_lookup.find( self[:aliased_object_fullname] ) + object_lookup.find(self[:aliased_object_fullname]) end # @return [Boolean] +true+ if the object has an @api tag def api_tag? self[:api_tag?] @@ -170,11 +170,11 @@ self[:nodoc?] end # @return [CodeObject::Proxy::Base,nil] the parent of the current object or +nil+ def parent - object_lookup.find( self[:parent_fullname] ) + object_lookup.find(self[:parent_fullname]) end def private? self[:private?] end @@ -203,11 +203,11 @@ def source self[:source] end def type - self.class.to_s.gsub(/Object$/, '') + self.class.to_s.gsub(/Object$/, "") end # @return [Boolean] +true+ if the object has no documentation at all def undocumented? self[:undocumented?] @@ -231,10 +231,10 @@ def marshal_load(attributes) @attributes = attributes end def inspect - "#<#{self.class.to_s}: #{fullname}>" + "#<#{self.class}: #{fullname}>" end end end end end