Class: Txdb::TxResource

Inherits:
Object
  • Object
show all
Defined in:
lib/txdb/tx_resource.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentObject (readonly)

Returns the value of attribute content.



3
4
5
# File 'lib/txdb/tx_resource.rb', line 3

def content
  @content
end

#originalObject (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

Returns:

  • (Boolean)


10
11
12
# File 'lib/txdb/tx_resource.rb', line 10

def respond_to?(method)
  original.respond_to?(method)
end