Class: Prmd::Link

Inherits:
Object
  • Object
show all
Defined in:
lib/prmd/link.rb

Defined Under Namespace

Classes: Schema

Instance Method Summary collapse

Constructor Details

#initialize(link_schema) ⇒ Link

Returns a new instance of Link.


5
6
7
# File 'lib/prmd/link.rb', line 5

def initialize(link_schema)
  @link_schema = link_schema 
end

Instance Method Details

#required_and_optional_parametersObject


9
10
11
12
13
# File 'lib/prmd/link.rb', line 9

def required_and_optional_parameters
  @params = {required: {}, optional: {} }
  recurse_properties(Schema.new(@link_schema["schema"]), "")
  [@params[:required], @params[:optional]]
end