Class: Do

Inherits:
Object
  • Object
show all
Defined in:
lib/opensecret/plugins.io/facts/fact.chars.rb

Overview

– – Dot the I’s and Cross the T’s –

Class Method Summary collapse

Class Method Details

.dqObject

– – dq => double quote – Deliver a " (backslash double quote). – Can solve the \\ triple backslash problem. – Use in Ruby and .ini fact files. –



36
37
38
# File 'lib/opensecret/plugins.io/facts/fact.chars.rb', line 36

def self.dq
  return "\""
end

.fObject

– – Note you do not need this method for declaration – of a fact that contains just a single forward slash. – The below will do. – – fact.name = / – – / => forward slash – Deliver a “/” fwd slash character –



26
27
28
# File 'lib/opensecret/plugins.io/facts/fact.chars.rb', line 26

def self.f
  return "/"
end

.tObject

– – p => period (full stop) – Deliver a “.” period character –



12
13
14
# File 'lib/opensecret/plugins.io/facts/fact.chars.rb', line 12

def self.t
  return "."
end