class Rets::Metadata::Table
Attributes
long_name[R]
name[R]
resource_id[R]
table_fragment[R]
Public Class Methods
new(table_fragment, resource_id)
click to toggle source
# File lib/rets/metadata/table.rb, line 6 def initialize(table_fragment, resource_id) @table_fragment = table_fragment @resource_id = resource_id @name = table_fragment["SystemName"] @long_name = table_fragment["LongName"] end
Public Instance Methods
print_tree(out = $stdout)
click to toggle source
Print the tree to a file
- out
-
The file to print to. Defaults to $stdout.
# File lib/rets/metadata/table.rb, line 17 def print_tree(out = $stdout) out.puts "### Table: #{name}" out.puts " Resource: #{resource_id}" out.puts " ShortName: #{ table_fragment["ShortName"] }" out.puts " LongName: #{ long_name }" out.puts " StandardName: #{ table_fragment["StandardName"] }" out.puts " Units: #{ table_fragment["Units"] }" out.puts " Searchable: #{ table_fragment["Searchable"] }" out.puts " Required: #{table_fragment['Required']}" end
resolve(value)
click to toggle source
# File lib/rets/metadata/table.rb, line 28 def resolve(value) value.to_s.strip end