Class: Optimus::Reader::LogfileParser::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/log_file_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, level) ⇒ Column

Returns a new instance of Column.



278
279
280
281
# File 'lib/log_file_parser.rb', line 278

def initialize(name, level)
  @name = name
  @level = level
end

Instance Attribute Details

#levelObject

Returns the value of attribute level.



277
278
279
# File 'lib/log_file_parser.rb', line 277

def level
  @level
end

#nameObject

Returns the value of attribute name.



277
278
279
# File 'lib/log_file_parser.rb', line 277

def name
  @name
end

Instance Method Details

#==(c) ⇒ Object



283
284
285
# File 'lib/log_file_parser.rb', line 283

def ==(c)
  @name == c.name and @level == c.level
end

#hashObject



287
288
289
# File 'lib/log_file_parser.rb', line 287

def hash
  return self.to_s.hash
end

#to_sObject



291
292
293
# File 'lib/log_file_parser.rb', line 291

def to_s
  "#{@name}[#{@level}]"
end