Class: CRFPP::Macro

Inherits:
Struct
  • Object
show all
Defined in:
lib/crfpp/macro.rb

Constant Summary collapse

TEMPLATE =
'%%x[%d,%d]'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(row = 0, column = 0) ⇒ Macro

Returns a new instance of Macro.



8
9
10
# File 'lib/crfpp/macro.rb', line 8

def initialize(row = 0, column = 0)
  super
end

Instance Attribute Details

#columnObject Also known as: col

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



2
3
4
# File 'lib/crfpp/macro.rb', line 2

def column
  @column
end

#rowObject

Returns the value of attribute row

Returns:

  • (Object)

    the current value of row



2
3
4
# File 'lib/crfpp/macro.rb', line 2

def row
  @row
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/crfpp/macro.rb', line 12

def to_s
  TEMPLATE % values
end