Class: Axe::API::Options

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/axe/api/options.rb

Instance Method Summary collapse

Constructor Details

#initializeOptions

Returns a new instance of Options.



12
13
14
15
# File 'lib/axe/api/options.rb', line 12

def initialize
  @rules = Rules.new
  @custom = {}
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/axe/api/options.rb', line 29

def empty?
  to_hash.empty?
end

#to_hObject



17
18
19
# File 'lib/axe/api/options.rb', line 17

def to_h
  to_hash
end

#to_hashObject



21
22
23
# File 'lib/axe/api/options.rb', line 21

def to_hash
  @rules.to_hash.merge(@custom)
end

#to_json(options = nil) ⇒ Object Also known as: to_s



25
26
27
# File 'lib/axe/api/options.rb', line 25

def to_json(options = nil)
  to_hash.to_json options
end