Module: Median::XmlSupport::ClassMethods

Defined in:
lib/median/xml_support.rb

Instance Method Summary collapse

Instance Method Details

#field(name, options = {}, &block) ⇒ Object



83
84
85
86
87
88
# File 'lib/median/xml_support.rb', line 83

def field(name, options = {}, &block)
  attr_accessor name.to_sym
  cattr_accessor :fields
  self.fields ||= {}
  self.fields[name.to_sym] = options
end