Class: GrADS::Command::DataHandler
- Inherits:
-
Object
- Object
- GrADS::Command::DataHandler
- Defined in:
- lib/grads/command.rb
Instance Attribute Summary collapse
-
#file_id ⇒ Object
readonly
Returns the value of attribute file_id.
Instance Method Summary collapse
-
#initialize(file_id) ⇒ DataHandler
constructor
A new instance of DataHandler.
- #method_missing(id, *argv) ⇒ Object
- #var(name) ⇒ Object
Constructor Details
#initialize(file_id) ⇒ DataHandler
Returns a new instance of DataHandler.
99 100 101 |
# File 'lib/grads/command.rb', line 99 def initialize (file_id) @file_id = file_id end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(id, *argv) ⇒ Object
106 107 108 109 110 111 112 |
# File 'lib/grads/command.rb', line 106 def method_missing (id, *argv) if argv.empty? return Variable.new(@file_id, id.to_s) else super end end |
Instance Attribute Details
#file_id ⇒ Object (readonly)
Returns the value of attribute file_id.
102 103 104 |
# File 'lib/grads/command.rb', line 102 def file_id @file_id end |
Instance Method Details
#var(name) ⇒ Object
103 104 105 |
# File 'lib/grads/command.rb', line 103 def var (name) return Variable.new(@file_id, name) end |