Class: Expressir::Express::RemarkScanner::Remark

Inherits:
Struct
  • Object
show all
Defined in:
lib/expressir/express/remark_scanner.rb

Overview

Immutable value object describing a single extracted remark.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#formatObject

Returns the value of attribute format

Returns:

  • (Object)

    the current value of format



25
26
27
# File 'lib/expressir/express/remark_scanner.rb', line 25

def format
  @format
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



25
26
27
# File 'lib/expressir/express/remark_scanner.rb', line 25

def line
  @line
end

#positionObject

Returns the value of attribute position

Returns:

  • (Object)

    the current value of position



25
26
27
# File 'lib/expressir/express/remark_scanner.rb', line 25

def position
  @position
end

#tagObject

Returns the value of attribute tag

Returns:

  • (Object)

    the current value of tag



25
26
27
# File 'lib/expressir/express/remark_scanner.rb', line 25

def tag
  @tag
end

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



25
26
27
# File 'lib/expressir/express/remark_scanner.rb', line 25

def text
  @text
end

Instance Method Details

#embedded?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/expressir/express/remark_scanner.rb', line 30

def embedded?
  format == EMBEDDED_FORMAT
end

#tagged?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/expressir/express/remark_scanner.rb', line 34

def tagged?
  !tag.nil? && !tag.empty?
end

#tail?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/expressir/express/remark_scanner.rb', line 26

def tail?
  format == TAIL_FORMAT
end