Class: Trenni::Builder::Fragment
- Inherits:
-
Object
- Object
- Trenni::Builder::Fragment
- Defined in:
- lib/trenni/builder.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
- #call(builder) ⇒ Object
-
#initialize(block) ⇒ Fragment
constructor
A new instance of Fragment.
- #to_s ⇒ Object
Constructor Details
#initialize(block) ⇒ Fragment
Returns a new instance of Fragment.
34 35 36 37 |
# File 'lib/trenni/builder.rb', line 34 def initialize(block) @block = block @builder = nil end |
Instance Method Details
#==(other) ⇒ Object
53 54 55 56 |
# File 'lib/trenni/builder.rb', line 53 def == other # This is a bit of a hack... but is required for existing specs to pass: self.to_s == other.to_s end |
#call(builder) ⇒ Object
39 40 41 |
# File 'lib/trenni/builder.rb', line 39 def call(builder) @block.call(builder) end |