Method: Reactor::Cm::XmlAttribute#initialize
- Defined in:
- lib/reactor/cm/xml_attribute.rb
#initialize(name, type, options) ⇒ XmlAttribute
Returns a new instance of XmlAttribute.
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/reactor/cm/xml_attribute.rb', line 8 def initialize(name, type, ) @name = name @type = type.presence || :string @scopes = if [:except].present? AVAILABLE_SCOPES - [:except] elsif [:only].present? [:only] else AVAILABLE_SCOPES end end |