Class: Mysql::BinLogPositionFile
- Inherits:
- 
      Object
      
        - Object
- Mysql::BinLogPositionFile
 
- Defined in:
- lib/flydata/fluent-plugins/mysql/binlog_position_file.rb
Instance Attribute Summary collapse
- 
  
    
      #path  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute path. 
Instance Method Summary collapse
- #exists? ⇒ Boolean
- 
  
    
      #initialize(path)  ⇒ BinLogPositionFile 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of BinLogPositionFile. 
- #read ⇒ Object
Constructor Details
#initialize(path) ⇒ BinLogPositionFile
Returns a new instance of BinLogPositionFile.
| 5 6 7 | # File 'lib/flydata/fluent-plugins/mysql/binlog_position_file.rb', line 5 def initialize(path) @path = path end | 
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
| 3 4 5 | # File 'lib/flydata/fluent-plugins/mysql/binlog_position_file.rb', line 3 def path @path end | 
Instance Method Details
#exists? ⇒ Boolean
| 9 10 11 | # File 'lib/flydata/fluent-plugins/mysql/binlog_position_file.rb', line 9 def exists? File.exists?(@path) end | 
#read ⇒ Object
| 13 14 15 | # File 'lib/flydata/fluent-plugins/mysql/binlog_position_file.rb', line 13 def read File.open(@path) {|f| f.read } end |