Class: BitexBot::FileSettings

Inherits:
Hashie::Clash
  • Object
show all
Defined in:
lib/bitex_bot/settings.rb

Overview

Documentation here!

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



9
10
11
12
13
# File 'lib/bitex_bot/settings.rb', line 9

def method_missing(name, *args, &block)
  return super unless args.none? && args.size == 1

  self[name] = args.first
end

Instance Method Details

#respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/bitex_bot/settings.rb', line 15

def respond_to_missing?(method_name, include_private = false)
  respond_to?(method_name) || super
end