Class: Shorty::Core
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Shorty::Core
- Defined in:
- lib/shorty/core.rb
Instance Attribute Summary collapse
-
#database_url ⇒ Object
Returns the value of attribute database_url.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Core
constructor
A new instance of Core.
Constructor Details
#initialize {|_self| ... } ⇒ Core
Returns a new instance of Core.
8 9 10 11 12 |
# File 'lib/shorty/core.rb', line 8 def initialize(&block) yield self DataMapper.setup(:default, database_url) super end |
Instance Attribute Details
#database_url ⇒ Object
Returns the value of attribute database_url.
6 7 8 |
# File 'lib/shorty/core.rb', line 6 def database_url @database_url end |