@jarib Is it possible use WebIDL to generate the following attributes signature:

```ruby
class Option < HTMLElement
  attribute 'Boolean', :default_selected?
  attribute 'Boolean', :disabled?
  attribute 'Boolean', :selected?
  attribute 'HTMLElement', :form
  attribute 'Fixnum', :index
  attribute 'String', :text
  attribute 'String', :value
end
```

instead of current

```ruby
class Option < HTMLElement
  attributes(:bool => [:default_selected, :disabled, :selected], :html_element 
=> [:form], :int => [:index], :string => [:label, :text, :value])
end
```

If this is possible, we can use [YARD 
macros](https://github.com/lsegal/yard/wiki/Tags#wiki-macros) rather than 
current handler to automatically generate documentation for attribute methods:

```ruby
class HTMLElement
  # @macro [attach] attribute
  #  @method $2
  #  @return [$1]
  def self.attribute(type, method)
  end
end
```

For a test, I've generated doc. You can check it out in [my 
gist](https://gist.github.com/p0deje/8862219)

---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-webdriver/issues/215#issuecomment-34434419
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to