class Xommelier::Xml::Element::Structure::Property
Attributes
name[R]
options[R]
Public Class Methods
new(name, options)
click to toggle source
# File lib/xommelier/xml/element/structure/property.rb, line 13 def initialize(name, options) @name = name @options = self.class.const_get(:DEFAULTS).merge(options) end
Public Instance Methods
complex_type?()
click to toggle source
# File lib/xommelier/xml/element/structure/property.rb, line 38 def complex_type? type < Xml::Element end
default()
click to toggle source
# File lib/xommelier/xml/element/structure/property.rb, line 29 def default options[:default] end
default?()
click to toggle source
@return [true, false] has default value?
# File lib/xommelier/xml/element/structure/property.rb, line 43 def default? options.key?(:default) && required? end
inspect()
click to toggle source
# File lib/xommelier/xml/element/structure/property.rb, line 47 def inspect "#<Xommelier::X::E::S::#{self.class.name.demodulize}:0x#{object_id.to_s(16)} #{instance_variables.map { |ivar| "#{ivar}=#{instance_variable_get(ivar).inspect}" }.join(' ')}>" end
ns()
click to toggle source
@return [Xommelier::Xml::Namespace]
# File lib/xommelier/xml/element/structure/property.rb, line 25 def ns options[:ns] end
type()
click to toggle source
@return [Class]
# File lib/xommelier/xml/element/structure/property.rb, line 34 def type options[:type] end
writer()
click to toggle source
# File lib/xommelier/xml/element/structure/property.rb, line 20 def writer @writer ||= "#{name}=" end
Protected Instance Methods
overrides()
click to toggle source
# File lib/xommelier/xml/element/structure/property.rb, line 53 def overrides @overrides ||= {} end