Class: Lutaml::Model::Location

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/model/schema_location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(namespace:, location:) ⇒ Location

Returns a new instance of Location.



6
7
8
9
# File 'lib/lutaml/model/schema_location.rb', line 6

def initialize(namespace:, location:)
  @namespace = namespace
  @location = location
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



4
5
6
# File 'lib/lutaml/model/schema_location.rb', line 4

def location
  @location
end

#namespaceObject (readonly)

Returns the value of attribute namespace.



4
5
6
# File 'lib/lutaml/model/schema_location.rb', line 4

def namespace
  @namespace
end

Instance Method Details

#eql?(other) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)


15
16
17
18
19
# File 'lib/lutaml/model/schema_location.rb', line 15

def eql?(other)
  other.class == self.class &&
    namespace == other.namespace &&
    location == other.location
end

#to_xml_attributeObject



11
12
13
# File 'lib/lutaml/model/schema_location.rb', line 11

def to_xml_attribute
  "#{@namespace} #{@location}".strip
end