Class: NormalizeXml::Controller
- Inherits:
-
Object
- Object
- NormalizeXml::Controller
- Defined in:
- lib/normalizexml/controller.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
Returns the value of attribute model.
-
#someFlag ⇒ Object
Returns the value of attribute someFlag.
-
#verbose(arg) ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
- #doSomethingWithCmdLineArg(arg) ⇒ Object
- #doSomethingWithSwitch(arg) ⇒ Object
- #infile=(infile) ⇒ Object
-
#initialize ⇒ Controller
constructor
A new instance of Controller.
- #noCmdLineArg ⇒ Object
- #normalize ⇒ Object
- #outfile=(outfile) ⇒ Object
Constructor Details
Instance Attribute Details
#model ⇒ Object
Returns the value of attribute model.
20 21 22 |
# File 'lib/normalizexml/controller.rb', line 20 def model @model end |
#someFlag ⇒ Object
Returns the value of attribute someFlag.
19 20 21 |
# File 'lib/normalizexml/controller.rb', line 19 def someFlag @someFlag end |
#verbose(arg) ⇒ Object
Returns the value of attribute verbose.
21 22 23 |
# File 'lib/normalizexml/controller.rb', line 21 def verbose @verbose end |
Instance Method Details
#doSomethingWithCmdLineArg(arg) ⇒ Object
60 61 62 63 64 |
# File 'lib/normalizexml/controller.rb', line 60 def doSomethingWithCmdLineArg(arg) $LOG.debug "Controller::doSomethingWithCmdLineArg( #{arg} )" #raise ArgumentError.new("Unexpected argument: #{arg}") return true # I want cmd line args end |
#doSomethingWithSwitch(arg) ⇒ Object
55 56 57 |
# File 'lib/normalizexml/controller.rb', line 55 def doSomethingWithSwitch(arg) $LOG.debug "Controller::doSomethingWithSwitch( #{arg} )" end |
#infile=(infile) ⇒ Object
45 46 47 |
# File 'lib/normalizexml/controller.rb', line 45 def infile=(infile) @model.infile = infile end |
#noCmdLineArg ⇒ Object
67 68 69 70 71 |
# File 'lib/normalizexml/controller.rb', line 67 def noCmdLineArg() $LOG.debug "Controller::noCmdLineArg" raise ArgumentError.new("Argument expected.") return false # No arg, no worky. end |
#normalize ⇒ Object
74 75 76 77 |
# File 'lib/normalizexml/controller.rb', line 74 def normalize() $LOG.debug "Controller::normalize" @model.normalize() end |
#outfile=(outfile) ⇒ Object
50 51 52 |
# File 'lib/normalizexml/controller.rb', line 50 def outfile=(outfile) @model.outfile = outfile end |