Class: ReeDao::DtoContract

Inherits:
Object
  • Object
show all
Extended by:
Ree::Contracts::Truncatable
Defined in:
lib/ree_lib/packages/ree_dao/package/ree_dao/contract/dto_contract.rb

Class Method Summary collapse

Class Method Details

.message(value, name, lvl = 1) ⇒ Object



13
14
15
# File 'lib/ree_lib/packages/ree_dao/package/ree_dao/contract/dto_contract.rb', line 13

def self.message(value, name, lvl = 1)
  "expected #{to_s}, got => #{truncate(value.inspect)}"
end

.to_sObject



9
10
11
# File 'lib/ree_lib/packages/ree_dao/package/ree_dao/contract/dto_contract.rb', line 9

def self.to_s
  "ReeDto::Dto"
end

.valid?(obj) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/ree_lib/packages/ree_dao/package/ree_dao/contract/dto_contract.rb', line 5

def self.valid?(obj)
  obj.class.ancestors.include?(ReeDto::DSL)
end