Class: Quark::MdkRuntime::FakeEnvVars

Inherits:
DatawireQuarkCore::QuarkObject show all
Extended by:
DatawireQuarkCore::Static
Defined in:
lib/mdk_runtime.rb

Overview

Testing fake for EnvironmentVariables.

Constant Summary

Constants included from DatawireQuarkCore::Static

DatawireQuarkCore::Static::Unassigned

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DatawireQuarkCore::Static

_lazy_statics, static, unlazy_statics

Methods inherited from DatawireQuarkCore::QuarkObject

#to_s

Constructor Details

#initializeFakeEnvVars

Returns a new instance of FakeEnvVars.



2145
2146
2147
2148
2149
# File 'lib/mdk_runtime.rb', line 2145

def initialize()
    self.__init_fields__

    nil
end

Instance Attribute Details

#envObject

Returns the value of attribute env.



2138
2139
2140
# File 'lib/mdk_runtime.rb', line 2138

def env
  @env
end

Instance Method Details

#__init_fields__Object



2198
2199
2200
2201
2202
2203
# File 'lib/mdk_runtime.rb', line 2198

def __init_fields__()
    
    self.env = {}

    nil
end

#_getClassObject



2172
2173
2174
2175
2176
2177
# File 'lib/mdk_runtime.rb', line 2172

def _getClass()
    
    return "mdk_runtime.FakeEnvVars"

    nil
end

#_getField(name) ⇒ Object



2179
2180
2181
2182
2183
2184
2185
2186
2187
# File 'lib/mdk_runtime.rb', line 2179

def _getField(name)
    
    if ((name) == ("env"))
        return (self).env
    end
    return nil

    nil
end

#_setField(name, value) ⇒ Object



2189
2190
2191
2192
2193
2194
2195
2196
# File 'lib/mdk_runtime.rb', line 2189

def _setField(name, value)
    
    if ((name) == ("env"))
        (self).env = ::DatawireQuarkCore.cast(value) { ::Hash }
    end

    nil
end

#set(name, value) ⇒ Object



2154
2155
2156
2157
2158
2159
# File 'lib/mdk_runtime.rb', line 2154

def set(name, value)
    
    ((self).env)[name] = (value)

    nil
end

#var(name) ⇒ Object



2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
# File 'lib/mdk_runtime.rb', line 2161

def var(name)
    
    value = ::DatawireQuarkCore.cast(nil) { ::String }
    if (((self).env).key?(name))
        value = ((self).env)[name]
    end
    return ::Quark.mdk_runtime.EnvironmentVariable.new(name, value)

    nil
end