Class: Ea::Sources::Qea::Xref::PropertyDefinition

Inherits:
Struct
  • Object
show all
Defined in:
lib/ea/sources/qea/xref/property_definition.rb

Overview

Tagged-value / property definition record. Produced when the Description contains one or more @PROP=@NAME=..@ENDNAME; blocks for non-legend properties.

Example source:

@PROP=@NAME=isActive@ENDNAME;@TYPE=Boolean@ENDTYPE;
    @VALU=@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



14
15
16
# File 'lib/ea/sources/qea/xref/property_definition.rb', line 14

def name
  @name
end

#parameterObject

Returns the value of attribute parameter

Returns:

  • (Object)

    the current value of parameter



14
15
16
# File 'lib/ea/sources/qea/xref/property_definition.rb', line 14

def parameter
  @parameter
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



14
15
16
# File 'lib/ea/sources/qea/xref/property_definition.rb', line 14

def type
  @type
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



14
15
16
# File 'lib/ea/sources/qea/xref/property_definition.rb', line 14

def value
  @value
end

Instance Method Details

#boolean?Boolean

Returns true when the property is declared as Boolean.

Returns:

  • (Boolean)

    true when the property is declared as Boolean



22
23
24
# File 'lib/ea/sources/qea/xref/property_definition.rb', line 22

def boolean?
  type == "Boolean"
end

#default_value?Boolean

Returns true when the value field is non-empty.

Returns:

  • (Boolean)

    true when the value field is non-empty



17
18
19
# File 'lib/ea/sources/qea/xref/property_definition.rb', line 17

def default_value?
  !value.nil? && !value.empty?
end