Sha256: deb5fe2a4f2f222ab479c54715d58b058d78c58f19a561073abc71b1d08effc2
Contents?: true
Size: 572 Bytes
Versions: 8
Compression:
Stored size: 572 Bytes
Contents
module Reactor module Cm class XmlAttribute AVAILABLE_SCOPES = %i(get set create).freeze attr_accessor :name, :type, :scopes def initialize(name, type, options) @name = name @type = type.presence || :string @scopes = if options[:except].present? AVAILABLE_SCOPES - options[:except] elsif options[:only].present? options[:only] else AVAILABLE_SCOPES end end def scope?(name) scopes.include?(name) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems