Class: Apia::Definition

Inherits:
Object
  • Object
show all
Defined in:
lib/apia/definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ Definition

Returns a new instance of Definition.



11
12
13
14
# File 'lib/apia/definition.rb', line 11

def initialize(id)
  @id = id
  setup
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



8
9
10
# File 'lib/apia/definition.rb', line 8

def description
  @description
end

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/apia/definition.rb', line 6

def id
  @id
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/apia/definition.rb', line 7

def name
  @name
end

#schemaObject

Returns the value of attribute schema.



9
10
11
# File 'lib/apia/definition.rb', line 9

def schema
  @schema
end

Instance Method Details

#schema?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/apia/definition.rb', line 16

def schema?
  @schema != false
end

#setupObject



23
24
# File 'lib/apia/definition.rb', line 23

def setup
end

#validate(errors) ⇒ Object



20
21
# File 'lib/apia/definition.rb', line 20

def validate(errors)
end