class Handlebars::Helpers::Comparison::Gte
Gte: (greater than or equal to) Block helper that renders a block if `a` is **greater than** `b`. If an inverse block is specified it will be rendered when falsy.
Public Instance Methods
handlebars_helper()
click to toggle source
# File lib/handlebars/helpers/comparison/gte.rb, line 37 def handlebars_helper proc { |_context, lhs, rhs| wrapper(parse(lhs, rhs)) } end
parse(lhs, rhs)
click to toggle source
Parse will Gte: (greater than or equal to) Block helper that renders a block if `a` is **greater than** `b`. If an inverse block is specified it will be rendered when falsy.
@example
puts Gte.new.parse(1, 2) Falsey puts Gte.new.parse(1, 1) Truthy puts Gte.new.parse(2, 1) Truthy
@param [String] lhs - left hand side value @param [String] rhs - right hand side value @return [String] truthy value if left hand side GREATER THAN or EQUAL TO right hand side
# File lib/handlebars/helpers/comparison/gte.rb, line 33 def parse(lhs, rhs) lhs >= rhs end