Class: Redwood::Location

Inherits:
Object show all
Defined in:
lib/sup/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source, info) ⇒ Location

Returns a new instance of Location.



694
695
696
697
# File 'lib/sup/message.rb', line 694

def initialize source, info
  @source = source
  @info = info
end

Instance Attribute Details

#infoObject (readonly)

Returns the value of attribute info.



692
693
694
# File 'lib/sup/message.rb', line 692

def info
  @info
end

#sourceObject (readonly)

Returns the value of attribute source.



691
692
693
# File 'lib/sup/message.rb', line 691

def source
  @source
end

Instance Method Details

#==(o) ⇒ Object



720
721
722
# File 'lib/sup/message.rb', line 720

def == o
  o.source.id == source.id and o.info == info
end

#each_raw_message_line(&b) ⇒ Object

much faster than raw_message



708
709
710
# File 'lib/sup/message.rb', line 708

def each_raw_message_line &b
  source.each_raw_message_line info, &b
end

#hashObject



724
725
726
# File 'lib/sup/message.rb', line 724

def hash
  [source.id, info].hash
end

#parsed_messageObject



712
713
714
# File 'lib/sup/message.rb', line 712

def parsed_message
  source.load_message info
end

#raw_headerObject



699
700
701
# File 'lib/sup/message.rb', line 699

def raw_header
  source.raw_header info
end

#raw_messageObject



703
704
705
# File 'lib/sup/message.rb', line 703

def raw_message
  source.raw_message info
end

#valid?Boolean

Returns:

  • (Boolean)


716
717
718
# File 'lib/sup/message.rb', line 716

def valid?
  source.valid? info
end