Properties

Constructors

this
this(string value)
Undocumented in source.

Members

Structs

Property
struct Property
Undocumented in source.

Variables

hash
Property[string] hash;
indexName
string indexName;
Undocumented in source.
list
Property[] list;
localName
string localName;
Undocumented in source.
name
string name;
Undocumented in source.

Examples

parse a list of string properties

Properties(`"a"  "b"`).list.should.equal([
  Properties.Property("a", true),
  Properties.Property("b", true)]);

parse a list of string with spaces properties

Properties(`"a b c"  "c d e"`).list.should.equal([
  Properties.Property("a b c", true),
  Properties.Property("c d e", true)]);

parse a list of variables with spaces properties

Properties(`a 1 c  "c d e"`).list.should.equal([
  Properties.Property("a", false),
  Properties.Property("1", true),
  Properties.Property("c", false),
  Properties.Property("c d e", true)]);

parse a list of attributes with spaces properties

Properties(`a=1 b=value`).hash["a"]
  .should.equal(Properties.Property("1", true));

Properties(`a=1 b=value`).hash["b"]
  .should.equal(Properties.Property("value", false));

parse each properties

Properties(`list as |item|`).name.should.equal("list");
Properties(`list as |item|`).localName.should.equal("item");
Properties(`list as |item|`).indexName.should.equal("");


Properties(`list as | item index |`).name.should.equal("list");
Properties(`list as | item index |`).localName.should.equal("item");
Properties(`list as | item index |`).indexName.should.equal("index");

Meta