Class: Recliner::ViewFunction
Defined Under Namespace
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(body) ⇒ ViewFunction
constructor
A new instance of ViewFunction.
- #to_s ⇒ Object
Constructor Details
#initialize(body) ⇒ ViewFunction
Returns a new instance of ViewFunction.
5 6 7 8 9 10 11 |
# File 'lib/recliner/views/function.rb', line 5 def initialize(body) if body =~ /^\s*function/ @body = body else @body = "#{definition} { #{body} }" end end |