Class: Naver::Searchad::Api::RequestOptions

Inherits:
Struct
  • Object
show all
Defined in:
lib/naver/searchad/api/options.rb,
lib/naver/searchad/api/options.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#authorizationObject

Returns the value of attribute authorization

Returns:

  • (Object)

    the current value of authorization



4
5
6
# File 'lib/naver/searchad/api/options.rb', line 4

def authorization
  @authorization
end

#headerObject

Returns the value of attribute header

Returns:

  • (Object)

    the current value of header



4
5
6
# File 'lib/naver/searchad/api/options.rb', line 4

def header
  @header
end

#normalize_unicodeObject

Returns the value of attribute normalize_unicode

Returns:

  • (Object)

    the current value of normalize_unicode



4
5
6
# File 'lib/naver/searchad/api/options.rb', line 4

def normalize_unicode
  @normalize_unicode
end

Class Method Details

.defaultObject



27
28
29
# File 'lib/naver/searchad/api/options.rb', line 27

def self.default
  @options ||= RequestOptions.new
end

Instance Method Details

#merge(options) ⇒ Object



31
32
33
34
35
36
37
38
39
40
# File 'lib/naver/searchad/api/options.rb', line 31

def merge(options)
  return self unless options

  new_options = dup
  members.each do |opt|
    opt = opt.to_sym
    new_options[opt] = options[opt] unless options[opt].nil?
  end
  new_options
end