class IronBank::Describe::Field

Describe a field in Zuora: name, label, type, etc.

Constants

BOOLEAN_VALUES
PLURAL_VALUES
TEXT_VALUES

Attributes

doc[R]

Public Class Methods

from_xml(doc) click to toggle source
# File lib/iron_bank/describe/field.rb, line 30
def self.from_xml(doc)
  new(doc)
end
new(doc) click to toggle source
# File lib/iron_bank/describe/field.rb, line 60
def initialize(doc)
  @doc = doc
end

Public Instance Methods

inspect() click to toggle source
# File lib/iron_bank/describe/field.rb, line 52
def inspect
  "#<#{self.class}:0x#{(object_id << 1).to_s(16)} #{name} (#{type})>"
end
max_length() click to toggle source

Defined separately because the node name is not ruby-friendly

# File lib/iron_bank/describe/field.rb, line 35
def max_length
  doc.at_xpath(".//maxlength").text.to_i
end