Class: Tokite::Transfer

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
app/models/tokite/transfer.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#ruleObject (readonly)

Returns the value of attribute rule.



6
7
8
# File 'app/models/tokite/transfer.rb', line 6

def rule
  @rule
end

#rule_idObject

Returns the value of attribute rule_id.



5
6
7
# File 'app/models/tokite/transfer.rb', line 5

def rule_id
  @rule_id
end

#user_idObject

Returns the value of attribute user_id.



5
6
7
# File 'app/models/tokite/transfer.rb', line 5

def user_id
  @user_id
end

Class Method Details

.create!(attributes) ⇒ Object



8
9
10
11
12
13
# File 'app/models/tokite/transfer.rb', line 8

def self.create!(attributes)
  transfer = new(attributes)
  transfer.rule.update!(user_id: transfer.user_id)

  return transfer
end