Class: Shale::Schema::Compiler::XMLProperty Private
- Defined in:
- lib/shale/schema/compiler/xml_property.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class representing Shale’s property
Instance Attribute Summary collapse
-
#namespace ⇒ String
readonly
private
Return namespace URI.
-
#prefix ⇒ String
readonly
private
Return namespace prefix.
Attributes inherited from Property
#attribute_name, #mapping_name, #type
Instance Method Summary collapse
-
#attribute? ⇒ true, false
private
Check if property’s category is attribute.
-
#content? ⇒ true, false
private
Check if property’s category is content.
-
#element? ⇒ true, false
private
Check if property’s category is element.
-
#initialize(name:, type:, collection:, default:, prefix:, namespace:, category:) ⇒ XMLProperty
constructor
private
Initialize object.
Methods inherited from Property
Constructor Details
#initialize(name:, type:, collection:, default:, prefix:, namespace:, category:) ⇒ XMLProperty
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize object
37 38 39 40 41 42 |
# File 'lib/shale/schema/compiler/xml_property.rb', line 37 def initialize(name:, type:, collection:, default:, prefix:, namespace:, category:) super(name, type, collection, default) @prefix = prefix @namespace = namespace @category = category end |
Instance Attribute Details
#namespace ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return namespace URI
17 18 19 |
# File 'lib/shale/schema/compiler/xml_property.rb', line 17 def namespace @namespace end |
#prefix ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return namespace prefix
24 25 26 |
# File 'lib/shale/schema/compiler/xml_property.rb', line 24 def prefix @prefix end |
Instance Method Details
#attribute? ⇒ true, false
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Check if property’s category is attribute
58 59 60 |
# File 'lib/shale/schema/compiler/xml_property.rb', line 58 def attribute? @category == :attribute end |
#content? ⇒ true, false
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Check if property’s category is content
49 50 51 |
# File 'lib/shale/schema/compiler/xml_property.rb', line 49 def content? @category == :content end |
#element? ⇒ true, false
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Check if property’s category is element
67 68 69 |
# File 'lib/shale/schema/compiler/xml_property.rb', line 67 def element? @category == :element end |