--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Defines a method that returns a filtered dataset. Subsets create dataset methods, so they can be chained for scoping. For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Topic.subset(:joes, :username.like('%joe%'))\n  Topic.subset(:popular){|o| o.num_posts &gt; 100}\n  Topic.subset(:recent){|o| o.created_on &gt; Date.today - 7}\n"
- !ruby/struct:SM::Flow::P 
  body: "Allows you to do:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Topic.joes.recent.popular\n"
- !ruby/struct:SM::Flow::P 
  body: to get topics with a username that includes joe that have more than 100 posts and were created less than 7 days ago.
- !ruby/struct:SM::Flow::P 
  body: Both the args given and the block are passed to Dataset#filter.
full_name: Sequel::Model::ClassMethods#subset
is_singleton: false
name: subset
params: (name, *args, &block)
visibility: public
