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.



688
689
690
691
# File 'lib/sup/message.rb', line 688

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

Instance Attribute Details

#infoObject (readonly)

Returns the value of attribute info.



686
687
688
# File 'lib/sup/message.rb', line 686

def info
  @info
end

#sourceObject (readonly)

Returns the value of attribute source.



685
686
687
# File 'lib/sup/message.rb', line 685

def source
  @source
end

Instance Method Details

#==(o) ⇒ Object



714
715
716
# File 'lib/sup/message.rb', line 714

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

#each_raw_message_line(&b) ⇒ Object

much faster than raw_message



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

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

#hashObject



718
719
720
# File 'lib/sup/message.rb', line 718

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

#parsed_messageObject



706
707
708
# File 'lib/sup/message.rb', line 706

def parsed_message
  source.load_message info
end

#raw_headerObject



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

def raw_header
  source.raw_header info
end

#raw_messageObject



697
698
699
# File 'lib/sup/message.rb', line 697

def raw_message
  source.raw_message info
end

#valid?Boolean

Returns:

  • (Boolean)


710
711
712
# File 'lib/sup/message.rb', line 710

def valid?
  source.valid? info
end