Class: BerkeleyLibrary::Util::ODS::XML::Table::Repeatable

Inherits:
ElementNode
  • Object
show all
Defined in:
lib/berkeley_library/util/ods/xml/table/repeatable.rb

Direct Known Subclasses

TableCell, TableColumn, TableRow

Instance Attribute Summary collapse

Attributes inherited from ElementNode

#doc, #element_name, #namespace

Instance Method Summary collapse

Methods inherited from ElementNode

#add_child, #attributes, #children, #clear_attribute, #create_element, #element, #ensure_element!, #prefix, #prefixed_attr_name, #set_attribute

Constructor Details

#initialize(name, attr_name_num_repeated, number_repeated, table:) ⇒ Repeatable

Returns a new instance of Repeatable.



10
11
12
13
14
15
# File 'lib/berkeley_library/util/ods/xml/table/repeatable.rb', line 10

def initialize(name, attr_name_num_repeated, number_repeated, table:)
  super(:table, name, doc: table.doc)
  @table = table
  @attr_name_num_repeated = attr_name_num_repeated
  self.number_repeated = number_repeated
end

Instance Attribute Details

#attr_name_num_repeatedObject (readonly)

Returns the value of attribute attr_name_num_repeated.



8
9
10
# File 'lib/berkeley_library/util/ods/xml/table/repeatable.rb', line 8

def attr_name_num_repeated
  @attr_name_num_repeated
end

#number_repeatedObject

Returns the value of attribute number_repeated.



8
9
10
# File 'lib/berkeley_library/util/ods/xml/table/repeatable.rb', line 8

def number_repeated
  @number_repeated
end

#tableObject (readonly)

Returns the value of attribute table.



8
9
10
# File 'lib/berkeley_library/util/ods/xml/table/repeatable.rb', line 8

def table
  @table
end

Instance Method Details

#increment_repeats!Object



29
30
31
# File 'lib/berkeley_library/util/ods/xml/table/repeatable.rb', line 29

def increment_repeats!
  self.number_repeated += 1
end