Class: OdataDuty::SchemaBuilder::Container
- Inherits:
-
Object
- Object
- OdataDuty::SchemaBuilder::Container
- Defined in:
- lib/odata_duty/schema_builder/container.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#_defined_at_ ⇒ Object
readonly
Returns the value of attribute defined_at.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:) ⇒ Container
constructor
A new instance of Container.
Constructor Details
#initialize(name:) ⇒ Container
Returns a new instance of Container.
6 7 8 9 10 11 12 13 |
# File 'lib/odata_duty/schema_builder/container.rb', line 6 def initialize(name:) @name = name.clone @_defined_at_ = caller.find { |line| !line.include?('/lib/odata_duty/') } return if Property.valid_name?(@name) raise InvalidNCNamesError, "\"#{@name}\" is not a valid property name" end |
Instance Attribute Details
#_defined_at_ ⇒ Object (readonly)
Returns the value of attribute defined_at.
4 5 6 |
# File 'lib/odata_duty/schema_builder/container.rb', line 4 def _defined_at_ @_defined_at_ end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/odata_duty/schema_builder/container.rb', line 4 def name @name end |