Class: Linzer::Message::Field::FastIdentifier Private

Inherits:
Object
  • Object
show all
Defined in:
lib/linzer/message/field.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Lightweight FieldId for simple components (no parameters). Bypasses Starry parsing entirely. Duck-types with Identifier for use in the adapter’s [] method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(serialized, item) ⇒ FastIdentifier

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of FastIdentifier.



62
63
64
65
66
67
# File 'lib/linzer/message/field.rb', line 62

def initialize(serialized, item)
  @field_name = serialized
  @item       = item
  @serialized = serialized
  freeze
end

Instance Attribute Details

#field_nameObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



69
70
71
# File 'lib/linzer/message/field.rb', line 69

def field_name
  @field_name
end

#itemObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



69
70
71
# File 'lib/linzer/message/field.rb', line 69

def item
  @item
end

Instance Method Details

#derived?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


71
72
73
# File 'lib/linzer/message/field.rb', line 71

def derived?
  @item.value.start_with?("@")
end

#serializeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



75
76
77
# File 'lib/linzer/message/field.rb', line 75

def serialize
  @serialized
end