Class: BerkeleyLibrary::Util::ODS::XML::Table::Repeatable
- Inherits:
-
ElementNode
- Object
- ElementNode
- BerkeleyLibrary::Util::ODS::XML::Table::Repeatable
- Defined in:
- lib/berkeley_library/util/ods/xml/table/repeatable.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attr_name_num_repeated ⇒ Object
readonly
Returns the value of attribute attr_name_num_repeated.
-
#number_repeated ⇒ Object
Returns the value of attribute number_repeated.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Attributes inherited from ElementNode
#doc, #element_name, #namespace
Instance Method Summary collapse
- #increment_repeats! ⇒ Object
-
#initialize(name, attr_name_num_repeated, number_repeated, table:) ⇒ Repeatable
constructor
A new instance of Repeatable.
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_repeated ⇒ Object (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_repeated ⇒ Object
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 |
#table ⇒ Object (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 |