Class: String

Inherits:
Object show all
Defined in:
lib/nrser/core_ext/string.rb

Overview

Extension methods for String

Unicode Stylization collapse

Instance Method Summary collapse

Instance Method Details

#constantizeObject Also known as: to_const



25
26
27
# File 'lib/nrser/core_ext/string.rb', line 25

def constantize
  NRSER.constantize self
end

#dedentObject



14
15
16
# File 'lib/nrser/core_ext/string.rb', line 14

def dedent
  NRSER.dedent self
end

#ellipsis(*args) ⇒ Object

Calls NRSER.ellipsis on ‘self`.



46
47
48
# File 'lib/nrser/core_ext/string.rb', line 46

def ellipsis *args
  NRSER.ellipsis self, *args
end

#indent(*args) ⇒ Object



19
20
21
# File 'lib/nrser/core_ext/string.rb', line 19

def indent *args
  NRSER.indent self, *args
end

#to_pnPathname

Returns Convert self into a Pathname.

Returns:



35
36
37
# File 'lib/nrser/core_ext/string.rb', line 35

def to_pn
  Pathname.new self
end

#u_boldObject

Calls NRSER.u_bold on ‘self`



67
68
69
# File 'lib/nrser/core_ext/string.rb', line 67

def u_bold
  NRSER.u_bold self
end

#u_bold_italicObject

Calls NRSER.u_bold_italic on ‘self`



73
74
75
# File 'lib/nrser/core_ext/string.rb', line 73

def u_bold_italic
  NRSER.u_bold_italic self
end

#u_italicObject

Calls NRSER.u_italic on ‘self`



61
62
63
# File 'lib/nrser/core_ext/string.rb', line 61

def u_italic
  NRSER.u_italic self
end

#u_monoObject

Calls NRSER.u_mono on ‘self`



79
80
81
# File 'lib/nrser/core_ext/string.rb', line 79

def u_mono
  NRSER.u_mono self
end

#unblockObject



9
10
11
# File 'lib/nrser/core_ext/string.rb', line 9

def unblock
  NRSER.unblock self
end

#whitespace?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/nrser/core_ext/string.rb', line 40

def whitespace?
  NRSER.whitespace? self
end

#words(*args, &block) ⇒ Object

Calls NRSER.words on ‘self`



52
53
54
# File 'lib/nrser/core_ext/string.rb', line 52

def words *args, &block
  NRSER::words self, *args, &block
end