Module: Eazypi::SpecObject

Overview

Base module for OpenAPI spec Objects

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
# File 'lib/eazypi/spec_object.rb', line 6

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#initialize(&block) ⇒ Object



10
11
12
# File 'lib/eazypi/spec_object.rb', line 10

def initialize(&block)
  self.load(&block) if block_given?
end

#load(&block) ⇒ Object



14
15
16
# File 'lib/eazypi/spec_object.rb', line 14

def load(&block)
  instance_exec(&block)
end

#to_openapi_specObject



18
19
20
# File 'lib/eazypi/spec_object.rb', line 18

def to_openapi_spec
  raise "Not implemented"
end