Class: Swagger::Serializer::Store

Inherits:
Object
  • Object
show all
Defined in:
lib/swagger/serializer/store.rb

Defined Under Namespace

Classes: Injectors

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = nil) ⇒ Store

Returns a new instance of Store.



12
13
14
15
16
# File 'lib/swagger/serializer/store.rb', line 12

def initialize(options = nil)
  @options = options || {}
  @options[:inject_key] ||= "title"
  @options[:injectors] ||= Injectors.new(cache: @options[:cache])
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



10
11
12
# File 'lib/swagger/serializer/store.rb', line 10

def options
  @options
end

Class Method Details

.currentObject



5
6
7
# File 'lib/swagger/serializer/store.rb', line 5

def current
  @current ||= new
end

Instance Method Details

#serializer_optionsObject



18
19
20
# File 'lib/swagger/serializer/store.rb', line 18

def serializer_options
  @options
end