Class: OpenXml::Docx::Properties::Tab
- Inherits:
- 
      BaseProperty
      
        - Object
- BaseProperty
- OpenXml::Docx::Properties::Tab
 
- Defined in:
- lib/openxml/docx/properties/tab.rb
Constant Summary collapse
- VALID_TYPES =
- %i(bar center clear decimal end num start left right) 
- VALID_LEADERS =
- [nil, :dot, :heavy, :hyphen, :middleDot, :none, :underscore] 
Instance Attribute Summary collapse
- 
  
    
      #leader  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute leader. 
- 
  
    
      #position  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute position. 
- 
  
    
      #type  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute type. 
Attributes inherited from BaseProperty
Instance Method Summary collapse
- 
  
    
      #initialize(position, type, leader = nil)  ⇒ Tab 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Tab. 
- #to_xml(xml) ⇒ Object
Methods inherited from BaseProperty
#default_name, #default_namespace, #default_tag, name, #name, namespace, #namespace, #render?, #tag, tag, tag_is_one_of
Constructor Details
#initialize(position, type, leader = nil) ⇒ Tab
Returns a new instance of Tab.
| 10 11 12 13 14 | # File 'lib/openxml/docx/properties/tab.rb', line 10 def initialize(position, type, leader=nil) self.position = position self.type = type self.leader = leader end | 
Instance Attribute Details
#leader ⇒ Object
Returns the value of attribute leader.
| 5 6 7 | # File 'lib/openxml/docx/properties/tab.rb', line 5 def leader @leader end | 
#position ⇒ Object
Returns the value of attribute position.
| 5 6 7 | # File 'lib/openxml/docx/properties/tab.rb', line 5 def position @position end | 
#type ⇒ Object
Returns the value of attribute type.
| 5 6 7 | # File 'lib/openxml/docx/properties/tab.rb', line 5 def type @type end | 
Instance Method Details
#to_xml(xml) ⇒ Object
| 31 32 33 | # File 'lib/openxml/docx/properties/tab.rb', line 31 def to_xml(xml) xml["w"].public_send(tag, xml_attributes) end |