Class: Swaggable::TagDefinition

Inherits:
Object
  • Object
show all
Includes:
ForwardingDsl::Getsetter
Defined in:
lib/swaggable/tag_definition.rb

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) {|_self| ... } ⇒ TagDefinition

Returns a new instance of TagDefinition.

Yields:

  • (_self)

Yield Parameters:



12
13
14
15
# File 'lib/swaggable/tag_definition.rb', line 12

def initialize args = {}
  args.each {|k, v| self.send("#{k}=", v) }
  yield self if block_given?
end

Instance Method Details

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



17
18
19
# File 'lib/swaggable/tag_definition.rb', line 17

def == other
  self.name == other.name if other.respond_to?(:name)
end

#hashObject



22
23
24
# File 'lib/swaggable/tag_definition.rb', line 22

def hash
  name.hash
end