Method: Stellar::DSL.ClaimPredicate

Defined in:
lib/stellar/dsl.rb

.ClaimPredicate(&block) ⇒ Object

Constructs a new ClaimPredicate using DSL

Examples:

fulfilled during [T+5min, T+60min] period, where T refers to claimable balance entry creation time

Stellar::ClaimPredicate { before_relative_time(1.hour) & ~before_relative_time(5.minutes) }

not fulfilled starting from today midnight until tomorrow midnight,

Stellar::ClaimPredicate { before_absolute_time(Date.today.end_of_day) | ~before_absolute_time(Date.tomorrow.end_of_day) }

always fulfilled

Stellar::ClaimPredicate { }


15
16
17
18
# File 'lib/stellar/dsl.rb', line 15

def ClaimPredicate(&block)
  return ClaimPredicate.unconditional unless block
  ClaimPredicate.compose(&block)
end