lib/onebox/engine/example_onebox.rb in onebox-1.0.1 vs lib/onebox/engine/example_onebox.rb in onebox-1.1.0
- old
+ new
@@ -3,22 +3,21 @@
class ExampleOnebox
include Engine
include HTML
matches do
- find "example.com"
+ http
+ maybe("www.")
+ domain("example")
+ has(".com").maybe("/")
end
private
def data
{
header: raw.css("h1").inner_text
}
- end
-
- def template
- %|<div class="onebox">{{header}}</div>|
end
end
end
end