Class: ENV

Inherits:
Object show all
Defined in:
lib/ruuuby/virtual/env.rb

Overview

modify the Ruby-‘singleton’ ENV

Class Method Summary collapse

Class Method Details

.fetch🔑(*env_key_then_opts) ⇒ String, *

Returns the value found or (w/ 2 args) the default value provided.

Raises:

  • (RuntimeError)

    when provided 1 arg and the key DNE

  • (ArgumentError)

    when a non-string type is provided for the first argument

  • (ArgumentError)

    when no arguments, or too many were provided



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/ruuuby/virtual/env.rb', line 59

def fetch

.parse_feature_behaviors(feature_uid, max_uid, min_allowed = -1,, max_allowed = -1)) ⇒ Array

Raises:

  • (ArgumentError)


90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/ruuuby/virtual/env.rb', line 90

def parse_feature_behaviors(feature_uid, max_uid, min_allowed=-1, max_allowed=-1)
  

.validate_feature_behavior_syntax!(content) ⇒ String

Returns the same param(content) provided.

Raises:

  • (ArgumentError)

    if the provided param(content) does not have the syntax of a feature behavior



134
135
136
137
138
139
140
141
# File 'lib/ruuuby/virtual/env.rb', line 134

def validate_feature_behavior_syntax!(content)
  

.∀🔑∃_value?(keys_to_find, expected_value) ⇒ Boolean

TODO: MISSING TDD!

‘does each provided key exist w/ the the same provided value?`



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/ruuuby/virtual/env.rb', line 19

def 

.∃?(the_key) ⇒ Boolean

Returns true, if there exists an ENV_VAR w/ matching name.

Raises:

  • (ArgumentError)

    if the provided arg(the_key) is not of type String



47
48
49
50
# File 'lib/ruuuby/virtual/env.rb', line 47

def