Module: Hamlit::AttributeBuilder

Defined in:
lib/hamlit/attribute_builder.rb,
ext/hamlit/hamlit.c

Constant Summary collapse

BOOLEAN_ATTRIBUTES =
%w[disabled readonly multiple checked autobuffer
autoplay controls loop selected hidden scoped async
defer reversed ismap seamless muted required
autofocus novalidate formnovalidate open pubdate
itemscope allowfullscreen default inert sortable
truespeed typemustmatch].freeze

Class Method Summary collapse

Class Method Details

.buildObject



464
465
466
467
468
469
470
471
472
473
# File 'ext/hamlit/hamlit.c', line 464

static VALUE
rb_hamlit_build(int argc, VALUE *argv, RB_UNUSED_VAR(VALUE self))
{
  VALUE array;

  rb_check_arity(argc, 4, UNLIMITED_ARGUMENTS);
  rb_scan_args(argc - 4, argv + 4, "*", &array);

  return hamlit_build(argv[0], argv[1], argv[2], argv[3], array);
}

.build_classObject



442
443
444
445
446
447
448
449
450
451
# File 'ext/hamlit/hamlit.c', line 442

static VALUE
rb_hamlit_build_class(int argc, VALUE *argv, RB_UNUSED_VAR(VALUE self))
{
  VALUE array;

  rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS);
  rb_scan_args(argc - 1, argv + 1, "*", &array);

  return hamlit_build_class(argv[0], array);
}

.build_dataObject



453
454
455
456
457
458
459
460
461
462
# File 'ext/hamlit/hamlit.c', line 453

static VALUE
rb_hamlit_build_data(int argc, VALUE *argv, RB_UNUSED_VAR(VALUE self))
{
  VALUE array;

  rb_check_arity(argc, 2, UNLIMITED_ARGUMENTS);
  rb_scan_args(argc - 2, argv + 2, "*", &array);

  return hamlit_build_data(argv[0], argv[1], array);
}

.build_idObject



431
432
433
434
435
436
437
438
439
440
# File 'ext/hamlit/hamlit.c', line 431

static VALUE
rb_hamlit_build_id(int argc, VALUE *argv, RB_UNUSED_VAR(VALUE self))
{
  VALUE array;

  rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS);
  rb_scan_args(argc - 1, argv + 1, "*", &array);

  return hamlit_build_id(argv[0], array);
}