Method: YARD::Options#to_hash

Defined in:
lib/yard/options.rb

#to_hashHash

Returns Converts options object to an options hash. All keys will be symbolized.

Returns:

  • (Hash)

    Converts options object to an options hash. All keys will be symbolized.



129
130
131
132
133
134
135
136
# File 'lib/yard/options.rb', line 129

def to_hash
  opts = {}
  instance_variables.each do |ivar|
    name = ivar.to_s.sub(/^@/, '')
    opts[name.to_sym] = send(name)
  end
  opts
end