Class: Lalka::InternalBase
- Inherits:
-
Object
- Object
- Lalka::InternalBase
- Defined in:
- lib/lalka.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
187 188 189 190 191 |
# File 'lib/lalka.rb', line 187 def call yield self rescue => e reject(e) end |
#on_error(&block) ⇒ Object
176 177 178 179 |
# File 'lib/lalka.rb', line 176 def on_error(&block) @on_error = block nil end |
#on_success(&block) ⇒ Object
171 172 173 174 |
# File 'lib/lalka.rb', line 171 def on_success(&block) @on_success = block nil end |
#try ⇒ Object
181 182 183 184 185 |
# File 'lib/lalka.rb', line 181 def try resolve(yield) rescue => e reject(e) end |