Class: Quark::MdkRuntime::EnvironmentVariable

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

Overview

EnvironmentVariable is a Supplier of Strings that come from the environment.

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

#initialize(variableName, value) ⇒ EnvironmentVariable

Returns a new instance of EnvironmentVariable.



775
776
777
778
779
780
781
782
# File 'lib/mdk_runtime.rb', line 775

def initialize(variableName, value)
    
    self.__init_fields__
    (self).variableName = variableName
    (self)._value = value

    nil
end

Instance Attribute Details

#_valueObject

Returns the value of attribute _value.



768
769
770
# File 'lib/mdk_runtime.rb', line 768

def _value
  @_value
end

#variableNameObject

Returns the value of attribute variableName.



768
769
770
# File 'lib/mdk_runtime.rb', line 768

def variableName
  @variableName
end

Instance Method Details

#__init_fields__Object



845
846
847
848
849
850
851
# File 'lib/mdk_runtime.rb', line 845

def __init_fields__()
    
    self.variableName = nil
    self._value = nil

    nil
end

#_getClassObject



813
814
815
816
817
818
# File 'lib/mdk_runtime.rb', line 813

def _getClass()
    
    return "mdk_runtime.EnvironmentVariable"

    nil
end

#_getField(name) ⇒ Object



820
821
822
823
824
825
826
827
828
829
830
831
# File 'lib/mdk_runtime.rb', line 820

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

    nil
end

#_setField(name, value) ⇒ Object



833
834
835
836
837
838
839
840
841
842
843
# File 'lib/mdk_runtime.rb', line 833

def _setField(name, value)
    
    if ((name) == ("variableName"))
        (self).variableName = ::DatawireQuarkCore.cast(value) { ::String }
    end
    if ((name) == ("_value"))
        (self)._value = ::DatawireQuarkCore.cast(value) { ::String }
    end

    nil
end

#getObject



794
795
796
797
798
799
# File 'lib/mdk_runtime.rb', line 794

def get()
    
    return (self)._value

    nil
end

#isDefinedObject



787
788
789
790
791
792
# File 'lib/mdk_runtime.rb', line 787

def isDefined()
    
    return (self.get()) != (nil)

    nil
end

#orElseGet(alternative) ⇒ Object



801
802
803
804
805
806
807
808
809
810
811
# File 'lib/mdk_runtime.rb', line 801

def orElseGet(alternative)
    
    result = self.get()
    if ((result) != (nil))
        return result
    else
        return alternative
    end

    nil
end