Class: Shorty::Core

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/shorty/core.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Core

Returns a new instance of Core.

Yields:

  • (_self)

Yield Parameters:

  • _self (Shorty::Core)

    the object that the method was called on



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_urlObject

Returns the value of attribute database_url.



6
7
8
# File 'lib/shorty/core.rb', line 6

def database_url
  @database_url
end