class Swaggable::SchemaDefinition
Public Instance Methods
==(other)
click to toggle source
# File lib/swaggable/schema_definition.rb, line 18 def == other self.name == other.name if other.respond_to?(:name) end
Also aliased as: eql?
attributes(&block)
click to toggle source
# File lib/swaggable/schema_definition.rb, line 7 def attributes &block ForwardingDsl.run( @attributes ||= build_attributes, &block ) end
empty?()
click to toggle source
# File lib/swaggable/schema_definition.rb, line 14 def empty? attributes.empty? end
hash()
click to toggle source
# File lib/swaggable/schema_definition.rb, line 23 def hash name.hash end
Private Instance Methods
build_attributes()
click to toggle source
# File lib/swaggable/schema_definition.rb, line 29 def build_attributes MiniObject::IndexedList.new.tap do |l| l.build { AttributeDefinition.new } l.key {|e| e.name } end end