Class: Rets::Metadata::LookupType

Inherits:
Object
  • Object
show all
Defined in:
lib/rets/metadata/lookup_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lookup_type_fragment) ⇒ LookupType

Returns a new instance of LookupType.



6
7
8
9
# File 'lib/rets/metadata/lookup_type.rb', line 6

def initialize(lookup_type_fragment)
  @value       = lookup_type_fragment["Value"].strip
  @long_value  = lookup_type_fragment["LongValue"].strip
end

Instance Attribute Details

#long_valueObject (readonly)

Returns the value of attribute long_value.



4
5
6
# File 'lib/rets/metadata/lookup_type.rb', line 4

def long_value
  @long_value
end

#valueObject (readonly)

Returns the value of attribute value.



4
5
6
# File 'lib/rets/metadata/lookup_type.rb', line 4

def value
  @value
end

Instance Method Details

Print the tree to a file

out

The file to print to. Defaults to $stdout.



14
15
16
# File 'lib/rets/metadata/lookup_type.rb', line 14

def print_tree(out = $stdout)
  out.puts "        #{long_value} -> #{value}"
end