Class: Object

Inherits:
BasicObject
Includes:
InMethod, SingletonMethods
Defined in:
lib/vex/base/object/insp.rb,
lib/vex/boot/blank.rb,
lib/vex/base/hash/slop.rb,
lib/vex/base/object/in.rb,
lib/vex/base/object/singleton_methods.rb,
lib/vex/base/invalid_argument/invalid_argument.rb

Overview

short inspect method on all objects.

“abcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnop”.insp

-> "abcdefghijklmnopabcdefghijk..."

Model.find(1).insp

-> "<Model#1>"

Defined Under Namespace

Modules: InMethod, SingletonMethods, WithBenchmark

Instance Method Summary collapse

Methods included from SingletonMethods

#define_object_method, #singleton_class

Methods included from InMethod

#in?

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


2
3
4
# File 'lib/vex/boot/blank.rb', line 2

def blank?
  false
end

#inspObject



10
11
12
13
14
# File 'lib/vex/base/object/insp.rb', line 10

def insp
  body = "#{insp_body}"
  body = ": #{body}" unless body.empty?
  "#{insp_head}#{body}#{insp_close}"
end

#not_implemented!Object



44
45
46
# File 'lib/vex/base/invalid_argument/invalid_argument.rb', line 44

def not_implemented!
  raise MissingImplementation, "#{self.class}##{caller_method_name}"
end

#slopObject



79
80
81
# File 'lib/vex/base/hash/slop.rb', line 79

def slop
  dup.slop!
end

#slop!Object



83
84
85
# File 'lib/vex/base/hash/slop.rb', line 83

def slop!    
  self
end

#sloppy?Boolean

Returns:

  • (Boolean)


87
88
89
# File 'lib/vex/base/hash/slop.rb', line 87

def sloppy?
  false
end