Class: OasRails::Spec::Reference

Inherits:
Object
  • Object
show all
Includes:
Specable
Defined in:
lib/oas_rails/spec/reference.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Specable

#as_json, #oas_fields

Constructor Details

#initialize(ref) ⇒ Reference

Returns a new instance of Reference.



7
8
9
# File 'lib/oas_rails/spec/reference.rb', line 7

def initialize(ref)
  @ref = ref
end

Instance Attribute Details

#refObject (readonly)

Returns the value of attribute ref.



5
6
7
# File 'lib/oas_rails/spec/reference.rb', line 5

def ref
  @ref
end

Instance Method Details

#to_specObject



11
12
13
# File 'lib/oas_rails/spec/reference.rb', line 11

def to_spec
  { '$ref' => @ref }
end