class Rets::Metadata::Containers::Container
Attributes
fragment[RW]
Public Class Methods
new(fragment)
click to toggle source
# File lib/rets/metadata/containers.rb, line 24 def initialize(fragment) self.fragment = fragment end
uses(*fields)
click to toggle source
# File lib/rets/metadata/containers.rb, line 14 def self.uses(*fields) fields.each do |field| define_method(field) do fields_hash[field] || fields_hash[field] = extract(fragment, field.to_s.capitalize) end end end
Public Instance Methods
extract(fragment, attr)
click to toggle source
# File lib/rets/metadata/containers.rb, line 28 def extract(fragment, attr) fragment.attr(attr) end
Private Instance Methods
fields_hash()
click to toggle source
# File lib/rets/metadata/containers.rb, line 34 def fields_hash @fields ||= {} end