Module: Dillo

Defined in:
lib/dillo.rb

Defined Under Namespace

Modules: Finders, Response Classes: Base, Collection, Column, Columns, Page, PaginatedCollection, Record, Row, Rows, SocrataAppTokenMiddleware, View, Views

Constant Summary collapse

VERSION =
'0.1'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.app_tokenObject

Returns the value of attribute app_token.



8
9
10
# File 'lib/dillo.rb', line 8

def app_token
  @app_token
end

.debugObject

Returns the value of attribute debug.



8
9
10
# File 'lib/dillo.rb', line 8

def debug
  @debug
end

Class Method Details

.underscore(hash) ⇒ Object



317
318
319
320
321
322
323
324
# File 'lib/dillo.rb', line 317

def self.underscore(hash)
  Hash.new.tap do |result|
    hash.each do |original_key, value|
      new_key = original_key.gsub(/([a-z])([A-Z])/) { "#{$1}_#{$2.downcase}" }
      result[new_key] = value.is_a?(Hash) ? underscore(value) : value
    end
  end
end

.viewsObject



313
314
315
# File 'lib/dillo.rb', line 313

def self.views
  @views ||= Views.new
end