Class: DSP::ColumnDescriptor
Overview
interface ColumnDescriptor {
/** Name of the attribute rendered in this column. */
attributeName: string;
/** Header UI label of column. */
label: string;
/** Format to use for the rendered values in this column. TBD how the format strings looks like. */
format?: string;
/** Datatype of values in this column. Defaults to 'string' if not specified. */
type?: 'string' | 'number' | 'boolean' | 'unixTimestampUTC';
/** Width of this column in characters (hint only). */
width?: number;
}
Instance Attribute Summary collapse
-
#attributeName ⇒ Object
type: string # type: string # type: string # type: string with value ‘string’ | ‘number’ | ‘boolean’ | ‘unixTimestampUTC’ # type: number.
-
#format ⇒ Object
type: string # type: string # type: string # type: string with value ‘string’ | ‘number’ | ‘boolean’ | ‘unixTimestampUTC’ # type: number.
-
#label ⇒ Object
type: string # type: string # type: string # type: string with value ‘string’ | ‘number’ | ‘boolean’ | ‘unixTimestampUTC’ # type: number.
-
#type ⇒ Object
type: string # type: string # type: string # type: string with value ‘string’ | ‘number’ | ‘boolean’ | ‘unixTimestampUTC’ # type: number.
-
#width ⇒ Object
type: string # type: string # type: string # type: string with value ‘string’ | ‘number’ | ‘boolean’ | ‘unixTimestampUTC’ # type: number.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ ColumnDescriptor
constructor
A new instance of ColumnDescriptor.
Methods inherited from DSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ ColumnDescriptor
Returns a new instance of ColumnDescriptor.
3830 3831 3832 3833 |
# File 'lib/dsp/dsp_protocol.rb', line 3830 def initialize(initial_hash = nil) super @optional_method_names = %i[format type width] end |
Instance Attribute Details
#attributeName ⇒ Object
type: string # type: string # type: string # type: string with value ‘string’ | ‘number’ | ‘boolean’ | ‘unixTimestampUTC’ # type: number
3828 3829 3830 |
# File 'lib/dsp/dsp_protocol.rb', line 3828 def attributeName @attributeName end |
#format ⇒ Object
type: string # type: string # type: string # type: string with value ‘string’ | ‘number’ | ‘boolean’ | ‘unixTimestampUTC’ # type: number
3828 3829 3830 |
# File 'lib/dsp/dsp_protocol.rb', line 3828 def format @format end |
#label ⇒ Object
type: string # type: string # type: string # type: string with value ‘string’ | ‘number’ | ‘boolean’ | ‘unixTimestampUTC’ # type: number
3828 3829 3830 |
# File 'lib/dsp/dsp_protocol.rb', line 3828 def label @label end |
#type ⇒ Object
type: string # type: string # type: string # type: string with value ‘string’ | ‘number’ | ‘boolean’ | ‘unixTimestampUTC’ # type: number
3828 3829 3830 |
# File 'lib/dsp/dsp_protocol.rb', line 3828 def type @type end |
#width ⇒ Object
type: string # type: string # type: string # type: string with value ‘string’ | ‘number’ | ‘boolean’ | ‘unixTimestampUTC’ # type: number
3828 3829 3830 |
# File 'lib/dsp/dsp_protocol.rb', line 3828 def width @width end |
Instance Method Details
#from_h!(value) ⇒ Object
3835 3836 3837 3838 3839 3840 3841 3842 3843 |
# File 'lib/dsp/dsp_protocol.rb', line 3835 def from_h!(value) value = {} if value.nil? self.attributeName = value['attributeName'] self.label = value['label'] self.format = value['format'] self.type = value['type'] # Unknown type self.width = value['width'] self end |