Module: Exhibitionist
- Defined in:
- lib/exhibitionist.rb,
lib/exhibitionist/base.rb,
lib/exhibitionist/version.rb
Defined Under Namespace
Classes: Base
Constant Summary collapse
- VERSION =
"0.0.1"
- @@exhibits =
[]
Class Method Summary collapse
-
.exhibit(object) ⇒ Object
end.
- .exhibits ⇒ Object
- .exhibits=(exhibits) ⇒ Object
- .register(*exhibits) ⇒ Object
Class Method Details
.exhibit(object) ⇒ Object
end
26 27 28 29 30 |
# File 'lib/exhibitionist.rb', line 26 def exhibit(object) @@exhibits.reduce object do |object, exhibit| exhibit.exhibit_if_applicable(object) end end |
.exhibits ⇒ Object
8 9 10 |
# File 'lib/exhibitionist.rb', line 8 def exhibits @@exhibits end |
.exhibits=(exhibits) ⇒ Object
12 13 14 |
# File 'lib/exhibitionist.rb', line 12 def exhibits=(exhibits) @@exhibits = exhibits end |
.register(*exhibits) ⇒ Object
16 17 18 19 |
# File 'lib/exhibitionist.rb', line 16 def register(*exhibits) @@exhibits += exhibits nil end |