File: TODO-4.0.md

package info (click to toggle)
ruby-representable 3.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 912 kB
  • sloc: ruby: 6,495; makefile: 3
file content (72 lines) | stat: -rw-r--r-- 1,681 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Decorator

  XML::Binding::Collection.to_xml(represented)
    bindings.each bin.to_xml


  # hat vorteil: [].each{ Collection.to_xml(item) }

* make all properties "Object-like", even arrays of strings etc. This saves us from having `extend ObjectBinding if typed?` and we could just call to_hash/from_hash on all attributes. performance issues here? otherwise: implement!


# how to?

class CH
  wrap :character
  prpoerty :a


class
  proerty :author, dec: CH

# how to?

* override specific bindings and their logic? e.g. `Namespace#read`
* Extend nested representers, e.g. the namespace prefix, when it gets plugged into composition
* Easier polymorphic representer

# XML

* ditch annoying nokogiri in favor of https://github.com/YorickPeterse/oga

# Parsing

* Let bindings have any "xpath"
* Allow to parse "wildcard" sections where you have no idea about the property names (and attribute names, eg. with links)

# Options

* There should be an easier way to pass a set of options to all nested #to_node decorators.

```ruby
representable_attrs.keys.each do |property|
  options[property.to_sym] = { show_definition: false, namespaces: options[:namespaces] }
end
```

* Allow passing options to Binding#serialize.
  serialize(.., options{:exclude => ..})


# wrap, as

AsWithNamespace( Binding )
   BUT NOT FOR AsWithNamespace( Binding::Attribute )
  => selectively wrap bindings at compile- and runtime






* Cleanup the manifest part in Decorator.

* all property objects should be extended/wrapped so we don't need the switch.

# Deprecations

* deprecate instance: { nil } which is superseded by parse_strategy: :sync



from_hash, property :band, class: vergessen