Class: RETS4R::Client::Transaction
- Inherits:
-
Object
- Object
- RETS4R::Client::Transaction
- Extended by:
- Forwardable
- Defined in:
- lib/rets4r/client/transaction.rb
Instance Attribute Summary collapse
-
#delimiter ⇒ Object
Returns the value of attribute delimiter.
-
#doc ⇒ Object
Returns the value of attribute doc.
-
#header ⇒ Object
Returns the value of attribute header.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#response ⇒ Object
Returns the value of attribute response.
-
#secondary_response ⇒ Object
Returns the value of attribute secondary_response.
Class Method Summary collapse
-
.deprecated_alias(old, new, msg = nil) ⇒ Object
:nodoc:.
-
.deprecated_attr_reader(*attrs) ⇒ Object
:nodoc:.
Instance Method Summary collapse
- #ascii_delimiter ⇒ Object
-
#initialize(doc = nil) ⇒ Transaction
constructor
A new instance of Transaction.
- #reply_code ⇒ Object
Constructor Details
#initialize(doc = nil) ⇒ Transaction
Returns a new instance of Transaction.
11 12 13 14 15 |
# File 'lib/rets4r/client/transaction.rb', line 11 def initialize(doc = nil) self.doc = doc || ResponseDocument::Base.new self.header = [] self.delimiter = ?\t end |
Instance Attribute Details
#delimiter ⇒ Object
Returns the value of attribute delimiter.
8 9 10 |
# File 'lib/rets4r/client/transaction.rb', line 8 def delimiter @delimiter end |
#doc ⇒ Object
Returns the value of attribute doc.
8 9 10 |
# File 'lib/rets4r/client/transaction.rb', line 8 def doc @doc end |
#header ⇒ Object
Returns the value of attribute header.
8 9 10 |
# File 'lib/rets4r/client/transaction.rb', line 8 def header @header end |
#metadata ⇒ Object
Returns the value of attribute metadata.
8 9 10 |
# File 'lib/rets4r/client/transaction.rb', line 8 def @metadata end |
#response ⇒ Object
Returns the value of attribute response.
8 9 10 |
# File 'lib/rets4r/client/transaction.rb', line 8 def response @response end |
#secondary_response ⇒ Object
Returns the value of attribute secondary_response.
8 9 10 |
# File 'lib/rets4r/client/transaction.rb', line 8 def secondary_response @secondary_response end |
Class Method Details
.deprecated_alias(old, new, msg = nil) ⇒ Object
:nodoc:
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/rets4r/client/transaction.rb', line 31 def deprecated_alias(old, new, msg = nil) # :nodoc: msg ||= "use \#{self.class}\##{new}" module_eval <<-"end;" def #{old}(*args, &block) if $VERBOSE warn("\#{caller.first}: " \ "warning: \#{self.class}\##{old} is deprecated; #{msg}") end #{new}(*args, &block) end end; end |
.deprecated_attr_reader(*attrs) ⇒ Object
:nodoc:
45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/rets4r/client/transaction.rb', line 45 def deprecated_attr_reader(*attrs) # :nodoc: attrs.each do |old| module_eval <<-"end;" def #{old}=(obj) if $VERBOSE warn("\#{caller.first}: " \ "warning: \#{self.class}\##{old} is deprecated; \#{self.class}\##{old} is now set at initialization") end @#{old} = obj end end; end end |
Instance Method Details
#ascii_delimiter ⇒ Object
26 27 28 |
# File 'lib/rets4r/client/transaction.rb', line 26 def ascii_delimiter self.delimiter.chr end |
#reply_code ⇒ Object
19 20 21 22 23 24 |
# File 'lib/rets4r/client/transaction.rb', line 19 def reply_code if $VERBOSE warn("#{caller.first}: warning: as of rets4r 2.0 #{self.class}#reply_code will be a numeric") end doc.reply_code.to_s end |