wycats (owner)

Revisions

gist: 225726 Download_button fork
public
Public Clone URL: git://gist.github.com/225726.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
+ interface "ActiveModel" do
+ Boolean = [TrueClass, FalseClass]
+ method :valid? => "Boolean"
+ method :new_record? => "Boolean"
+ method :destroyed? => "Boolean"
+ method :errors => "Errors"
+ end
+
+ enum "Boolean", true, false
+
+ interface "Errors" do
+ method :[] => Array, :args => [Symbol]
+ method :full_messages => Array
+ end
+
+ test_interface "Errors#[]", :with => [:hello]
+