Total Complexity | 4 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | module Hyalite::DOM |
||
81 | class Attributes |
||
82 | def initialize(element) |
||
83 | @element = element |
||
84 | end |
||
85 | |||
86 | def [](name) |
||
87 | @element.get_attribute(name) |
||
88 | end |
||
89 | |||
90 | def []=(name, value) |
||
91 | @element.set_attribute(name, value) |
||
92 | end |
||
93 | |||
94 | def remove(name) |
||
95 | @element.remove_attribute(name) |
||
96 | end |
||
97 | end |
||
98 | end |
||
100 |