Class: Txdb::TxResource
- Inherits:
-
Object
- Object
- Txdb::TxResource
- Defined in:
- lib/txdb/tx_resource.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#original ⇒ Object
readonly
Returns the value of attribute original.
Instance Method Summary collapse
-
#initialize(original, content) ⇒ TxResource
constructor
A new instance of TxResource.
- #method_missing(method, *args, &block) ⇒ Object
- #respond_to?(method) ⇒ Boolean
Constructor Details
#initialize(original, content) ⇒ TxResource
Returns a new instance of TxResource.
5 6 7 8 |
# File 'lib/txdb/tx_resource.rb', line 5 def initialize(original, content) @original = original @content = content end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
14 15 16 |
# File 'lib/txdb/tx_resource.rb', line 14 def method_missing(method, *args, &block) original.send(method, *args, &block) end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
3 4 5 |
# File 'lib/txdb/tx_resource.rb', line 3 def content @content end |
#original ⇒ Object (readonly)
Returns the value of attribute original.
3 4 5 |
# File 'lib/txdb/tx_resource.rb', line 3 def original @original end |
Instance Method Details
#respond_to?(method) ⇒ Boolean
10 11 12 |
# File 'lib/txdb/tx_resource.rb', line 10 def respond_to?(method) original.respond_to?(method) end |