Skip to content

Commit

Permalink
Merge pull request #12 from coinbase/pt-rails
Browse files Browse the repository at this point in the history
add some bind() rbis
  • Loading branch information
ptarjan authored Mar 15, 2019
2 parents e5963c0 + f998b5a commit 22dd994
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/actionpack/all/actionpack.rbi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class ActionDispatch::Routing::RouteSet
sig {params(blk: T.proc.bind(ActionDispatch::Routing::Mapper).void).void}
def draw(&blk); end
end
9 changes: 9 additions & 0 deletions lib/activerecord/all/activerecord.rbi
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class ActiveRecord::Schema
sig {params(info: Hash, blk: T.proc.bind(ActiveRecord::Schema).void).void}
def self.define(info = nil, &blk); end
end

class ActiveRecord::Migration::Current < ActiveRecord::Migration
def change_column(table_name, column_name, type, options = nil); end
def create_table(table_name, options = nil); end
end
4 changes: 4 additions & 0 deletions lib/activesupport/all/activesupport.rbi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module ActiveSupport
sig {params(kind: Symbol, blk: T.proc.bind(T.class_of(ActionController::Base)).void).void}
def self.on_load(kind, &blk); end
end
13 changes: 13 additions & 0 deletions lib/railties/all/railties.rbi
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module Rails
sig {returns(Rails::Application)}
def self.application; end
end

class Rails::Application
sig {params(blk: T.proc.bind(Rails::Application).void).void}
def configure(&blk); end

sig {returns(ActionDispatch::Routing::RouteSet)}
def routes; end
end

2 changes: 1 addition & 1 deletion rbis.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'rbis'
s.version = '0.0.12'
s.version = '0.0.13'
s.summary = 'rbi database'
s.description = 'Database of .rbi files containing Sorbet type definitions for gems and other stdlib classes.'
s.authors = ['Coinbase']
Expand Down

0 comments on commit 22dd994

Please sign in to comment.