Class: Nydp::Builtin::IsEqual

Inherits:
Object
  • Object
show all
Includes:
Base, Singleton
Defined in:
lib/nydp/builtin/is_equal.rb

Instance Method Summary collapse

Methods included from Base

#call, #handle_error, ignore_errors, #inspect, #nydp_type, #to_s

Methods included from Helper

#cons, #list, #literal?, #pair?, #sig, #sym, #sym?

Methods included from Converter

#n2r, #r2n, #rubify

Instance Method Details

#_eq?(arg, args) ⇒ Boolean

Returns:

  • (Boolean)


4
# File 'lib/nydp/builtin/is_equal.rb', line 4

def _eq?  arg, args ; args.all? { |a| a == arg }   ; end

#builtin_call(*args) ⇒ Object



8
9
10
# File 'lib/nydp/builtin/is_equal.rb', line 8

def builtin_call *args
  eq?(args) || nil
end

#eq?(args) ⇒ Boolean

Returns:

  • (Boolean)


5
# File 'lib/nydp/builtin/is_equal.rb', line 5

def eq?        args ; _eq? args.first, args[1..-1] ; end

#nameObject



6
# File 'lib/nydp/builtin/is_equal.rb', line 6

def name            ; "eq?"                        ; end