Class: Lowkey::ParamProxy

Inherits:
Proxy
  • Object
show all
Defined in:
lib/proxies/param_proxy.rb

Instance Attribute Summary collapse

Attributes inherited from Proxy

#name

Instance Method Summary collapse

Constructor Details

#initialize(name:, source:, type:, position: nil, value: :LOWKEY_UNDEFINED, expression: nil) ⇒ ParamProxy

rubocop:disable Metrics/ParameterLists



10
11
12
13
14
15
16
17
18
# File 'lib/proxies/param_proxy.rb', line 10

def initialize(name:, source:, type:, position: nil, value: :LOWKEY_UNDEFINED, expression: nil) # rubocop:disable Metrics/ParameterLists
  super(name:, source:)

  @type = type
  @position = position
  @value = value

  @expression = expression
end

Instance Attribute Details

#expressionObject

Returns the value of attribute expression.



8
9
10
# File 'lib/proxies/param_proxy.rb', line 8

def expression
  @expression
end

#positionObject (readonly)

Returns the value of attribute position.



7
8
9
# File 'lib/proxies/param_proxy.rb', line 7

def position
  @position
end

#typeObject (readonly)

Returns the value of attribute type.



7
8
9
# File 'lib/proxies/param_proxy.rb', line 7

def type
  @type
end

#valueObject (readonly)

Returns the value of attribute value.



7
8
9
# File 'lib/proxies/param_proxy.rb', line 7

def value
  @value
end

Instance Method Details

#required?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/proxies/param_proxy.rb', line 20

def required?
  @value == :LOWKEY_UNDEFINED
end