Class: WsdlMapper::Dom::TypeBase

Inherits:
Object
  • Object
show all
Defined in:
lib/wsdl_mapper/dom/type_base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ TypeBase

Returns a new instance of TypeBase.



9
10
11
12
# File 'lib/wsdl_mapper/dom/type_base.rb', line 9

def initialize(name)
  @name = name
  @documentation = Documentation.new
end

Instance Attribute Details

#documentationObject

Returns the value of attribute documentation.



7
8
9
# File 'lib/wsdl_mapper/dom/type_base.rb', line 7

def documentation
  @documentation
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/wsdl_mapper/dom/type_base.rb', line 6

def name
  @name
end

Class Method Details

.to_procObject



26
27
28
# File 'lib/wsdl_mapper/dom/type_base.rb', line 26

def self.to_proc
  -> (obj) { obj.is_a? self }
end

Instance Method Details

#==(other) ⇒ Object



18
19
20
# File 'lib/wsdl_mapper/dom/type_base.rb', line 18

def ==(other)
  eql? other
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/wsdl_mapper/dom/type_base.rb', line 22

def eql?(other)
  name ? (self.class == other.class && name == other.name) : super
end

#hashObject



14
15
16
# File 'lib/wsdl_mapper/dom/type_base.rb', line 14

def hash
  name ? [self.class, name].hash : super
end