lib/config_manager.rb
# Made the item.name like a reader
Made the item.name like a reader
Made the item . name like a reader
def add_setting_reader(item)
      self.send(:define_method, item.name) do
        raw_value = settings[item.name]
        raw_value.nil? ? item.default : raw_value
      end
      if item.ruby_type == :boolean
        self.send(:define_method, item.name + "?") do
          raw_value = settings[item.name]
          raw_value.nil? ? item.default : raw_value
        end
      end
    end
def add_setting_reader ( item ) self . send ( :define_method , item . name ) do raw_value = settings [ item . name ] raw_value . nil? ? item . default : raw_value end if item . ruby_type == :boolean self . send ( :define_method , item . name + "?" ) do raw_value = settings [ item . name ] raw_value . nil? ? item . default : raw_value end end end
Made the item.name like a reader
Made the item . name like a reader
item
<not_specific>