Module: XMLable::Mixins::Wrapper
- Defined in:
- lib/xmlable/mixins/wrapper.rb
Overview
Wrapper module contains methods to wrap the primitive classes
Instance Method Summary collapse
- #inspect ⇒ String
-
#is_a?(klass) ⇒ Boolean
Is wrapped class inherits from given class?.
- #method_missing(*args, &block) ⇒ Object
- #to_s(*args) ⇒ String
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
7 8 9 |
# File 'lib/xmlable/mixins/wrapper.rb', line 7 def method_missing(*args, &block) __object.send(*args, &block) end |
Instance Method Details
#inspect ⇒ String
32 33 34 |
# File 'lib/xmlable/mixins/wrapper.rb', line 32 def inspect "[Wrapper(#{__object.class})] #{__object.inspect}" end |
#is_a?(klass) ⇒ Boolean
Is wrapped class inherits from given class?
25 26 27 |
# File 'lib/xmlable/mixins/wrapper.rb', line 25 def is_a?(klass) __object.is_a?(klass) end |
#to_s(*args) ⇒ String
14 15 16 |
# File 'lib/xmlable/mixins/wrapper.rb', line 14 def to_s(*args) __object.to_s(*args) end |