Module: Ree::LinkDSL::ClassMethods

Includes:
Args
Defined in:
lib/ree/link_dsl.rb

Instance Method Summary collapse

Methods included from Args

#check_arg, #check_arg_any, #check_arg_array_of, #check_bool, #not_nil

Instance Method Details



27
28
29
30
31
32
33
34
35
# File 'lib/ree/link_dsl.rb', line 27

def link(*args, **kwargs)
  if args.first.is_a?(Symbol)
    _link_object(*args, **kwargs)
  elsif args.first.is_a?(String)
    _link_file(args[0], args[1])
  else
    _raise_error("Invalid link DSL usage. Args should be Hash or String")
  end
end