Class: EdifactConverter::FTXText::Text

Inherits:
Struct
  • Object
show all
Defined in:
lib/edifact_converter/ftx_text.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fontObject

Returns the value of attribute font

Returns:

  • (Object)

    the current value of font



29
30
31
# File 'lib/edifact_converter/ftx_text.rb', line 29

def font
  @font
end

#formatObject

Returns the value of attribute format

Returns:

  • (Object)

    the current value of format



29
30
31
# File 'lib/edifact_converter/ftx_text.rb', line 29

def format
  @format
end

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



29
30
31
# File 'lib/edifact_converter/ftx_text.rb', line 29

def text
  @text
end

Instance Method Details

#==(text) ⇒ Object



36
37
38
# File 'lib/edifact_converter/ftx_text.rb', line 36

def ==(text)
  format == text.format and font == text.font and self.text == text.text
end

#merge(text) ⇒ Object



31
32
33
34
# File 'lib/edifact_converter/ftx_text.rb', line 31

def merge(text)
  self.text << text.text
  self
end

#to_sObject



40
41
42
# File 'lib/edifact_converter/ftx_text.rb', line 40

def to_s
  "(#{font} #{format})#{text}"
end