Class: DoubleDouble::TransactionType

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/double_double/transaction_type.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.of(description_given) ⇒ Object



10
11
12
# File 'lib/double_double/transaction_type.rb', line 10

def self.of description_given
  TransactionType.where(description: description_given.to_s).first
end

Instance Method Details

#to_sObject



14
15
16
# File 'lib/double_double/transaction_type.rb', line 14

def to_s
  description
end