Class: Object
Overview
Constant Summary
Constants included
from Logging
Logging::ForwardSlashPattern
Instance Method Summary
collapse
Methods included from Logging
config, #get_formatted_logger_name, #init_java_logger, #init_logger, #init_ruby_logger, #log, log_level, log_level=, #ruby_log_formatter, #symbolize_numeric_log_level
#object?, #sysobj?
#matches?, #matches_any_exactly?, #matches_exactly?, #matches_last_exactly?
#in?, #notin?
Instance Method Details
30
31
32
|
# File 'lib/runtime/mixins.rb', line 30
def +(other)
format(JoinedTemplate, str: self.to_s, other: other.to_s)
end
|
#blank? ⇒ Boolean
59
60
61
|
# File 'lib/runtime/mixins.rb', line 59
def blank?
respond_to?(:empty?) ? empty? : self.nil?
end
|
34
35
36
37
38
39
40
41
|
# File 'lib/runtime/mixins.rb', line 34
def identity
identification = { klass: self.class }
identifier = (self.respond_to?(:object?) && self.object? ? self.id : self.object_id) || 0
identification[:name] = (self.respond_to?(:name) ? self.name : nil) || 'unnamed'
identification[:hex] = identifier << 1
identification[:id] = identifier
format(ObjectIdentityTemplate, identification)
end
|
#negative? ⇒ Boolean
53
54
55
56
57
|
# File 'lib/runtime/mixins.rb', line 53
def negative?
self.to_s.match?(/\A-?\d+?(\.\d+)?\Z/)
end
|
#number? ⇒ Boolean
43
44
45
|
# File 'lib/runtime/mixins.rb', line 43
def number?
self.to_s.match?(/\A[+-]?\d+?(\.\d+)?\Z/)
end
|
#positive? ⇒ Boolean
47
48
49
50
51
|
# File 'lib/runtime/mixins.rb', line 47
def positive?
self.to_s.match?(/\A+?\d+?(\.\d+)?\Z/)
end
|