Class: Toto::Config
Constant Summary collapse
- Defaults =
{ :author => ENV['USER'], # blog author :title => Dir.pwd.split('/').last, # site title :root => "index", # site index :url => "http://127.0.0.1", :date => lambda {|now| now.strftime("%d/%m/%Y") }, # date function :markdown => :smart, # use markdown :disqus => false, # disqus name :summary => {:max => 150, :delim => /~\n/}, # length of summary and delimiter :ext => 'txt', # extension for articles :cache => 28800, # cache duration (seconds) :github => {:user => "", :repos => [], :ext => 'md'} # Github username and list of repos }
Instance Method Summary collapse
- #[](key, *args) ⇒ Object
-
#initialize(obj) ⇒ Config
constructor
Github username and list of repos.
- #set(key, val) ⇒ Object
Constructor Details
Instance Method Details
#[](key, *args) ⇒ Object
303 304 305 306 |
# File 'lib/toto-haml.rb', line 303 def [] key, *args val = super(key) val.respond_to?(:call) ? val.call(*args) : val end |
#set(key, val) ⇒ Object
295 296 297 298 299 300 301 |
# File 'lib/toto-haml.rb', line 295 def set key, val if val.is_a? Hash self[key].update val else self[key] = val end end |