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
8 9 10 11 12 13 14 |
# File 'lib/oynx/config.rb', line 8 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
18 19 20 21 22 23 24 |
# File 'lib/oynx/config.rb', line 18 def to_s() ret = "" self.each_pair do |key, val| ret += "#{key}: #{val}\n" end return ret end |