Class: Sifterology::CommitFactory

Inherits:
Resource
  • Object
show all
Defined in:
lib/sifterology/factories/commit_factory.rb

Instance Attribute Summary

Attributes inherited from Resource

#factory, #last_request, #session

Instance Method Summary collapse

Methods inherited from Resource

#attributes=, #delete, #get, #initialize, #local_attributes=, #post, #put, sifter_attrs

Constructor Details

This class inherits a constructor from Sifterology::Resource

Instance Method Details

#build(attrs = {}) ⇒ Object



9
10
11
12
13
# File 'lib/sifterology/factories/commit_factory.rb', line 9

def build(attrs={})
  commit = Commit.new(session, self)
  commit.local_attributes = attrs
  commit
end

#create(attrs = {}) ⇒ Object



5
6
7
# File 'lib/sifterology/factories/commit_factory.rb', line 5

def create(attrs={})
  build(attrs).save
end