Class: OdataDuty::SchemaBuilder::Container

Inherits:
Object
  • Object
show all
Defined in:
lib/odata_duty/schema_builder/container.rb

Direct Known Subclasses

EntitySet

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/odata_duty/schema_builder/container.rb', line 4

def name
  @name
end