Module: Dry::Types::Options

Defined in:
lib/fortnox/api/types.rb

Instance Method Summary collapse

Instance Method Details

#is(*option_names) ⇒ Object



9
10
11
12
13
14
# File 'lib/fortnox/api/types.rb', line 9

def is(*option_names)
  new_options = option_names.each_with_object({}) do |name, hash|
    hash[name] = true
  end
  with(new_options)
end

#is?(option_name) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/fortnox/api/types.rb', line 16

def is?(option_name)
  @options[option_name]
end