Class: Numerals::Format::Notation

Inherits:
Object
  • Object
show all
Defined in:
lib/numerals/format/notation.rb

Direct Known Subclasses

HtmlNotation, LatexNotation, TextNotation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(format) ⇒ Notation

Returns a new instance of Notation.



7
8
9
# File 'lib/numerals/format/notation.rb', line 7

def initialize(format)
  @format = format
end

Instance Attribute Details

#formatObject (readonly)

Returns the value of attribute format.



11
12
13
# File 'lib/numerals/format/notation.rb', line 11

def format
  @format
end

Instance Method Details

#assemble(output, text_parts) ⇒ Object



13
14
15
# File 'lib/numerals/format/notation.rb', line 13

def assemble(output, text_parts)
  raise "assemble must be implemented in Notation derived class #{self.class}"
end

#disassemble(text) ⇒ Object



17
18
19
# File 'lib/numerals/format/notation.rb', line 17

def disassemble(text)
  raise "disassemble must be implemented in Notation derived class #{self.class}"
end