Class: Web_Config
- Inherits:
-
Hash
- Object
- Hash
- Web_Config
- Defined in:
- lib/oynx/config.rb
Overview
Web_Config is just a wrapper for a Hash with some custom keys instantiated for Oynx use.
Instance Method Summary collapse
-
#initialize ⇒ Web_Config
constructor
Set our custom keys to default values.
-
#to_s ⇒ Object
Our Web_Config as a String.
Constructor Details
#initialize ⇒ Web_Config
Set our custom keys to default values
6 7 8 9 10 11 12 |
# File 'lib/oynx/config.rb', line 6 def initialize() self["name"] = "new_site" self["charset"] = "utf-8" self["css"] = true self["js"] = true self["img"] = true end |
Instance Method Details
#to_s ⇒ Object
Our Web_Config as a String
15 16 17 18 19 20 21 |
# File 'lib/oynx/config.rb', line 15 def to_s() ret = "" self.each_pair do |key, val| ret += "#{key}: #{val}\n" end return ret end |