Module: Checked::Obj::Base
- Included in:
- Checked::Obj
- Defined in:
- lib/Checked/DSL.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#map ⇒ Object
Returns the value of attribute map.
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #<<(checked) ⇒ Object
- #get!(meth_name, *args) ⇒ Object
- #initialize ⇒ Object
- #off! ⇒ Object
- #off? ⇒ Boolean
- #on!(new_map) ⇒ Object
- #on? ⇒ Boolean
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
44 45 46 |
# File 'lib/Checked/DSL.rb', line 44 def app @app end |
#map ⇒ Object
Returns the value of attribute map.
44 45 46 |
# File 'lib/Checked/DSL.rb', line 44 def map @map end |
#name ⇒ Object
Returns the value of attribute name.
44 45 46 |
# File 'lib/Checked/DSL.rb', line 44 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
44 45 46 |
# File 'lib/Checked/DSL.rb', line 44 def value @value end |
Instance Method Details
#<<(checked) ⇒ Object
52 53 54 55 |
# File 'lib/Checked/DSL.rb', line 52 def << checked on! checked.map self.name = checked.name end |
#get!(meth_name, *args) ⇒ Object
75 76 77 78 |
# File 'lib/Checked/DSL.rb', line 75 def get! meth_name, *args self.app = Checked::App.new app.get!("/#{map}/#{meth_name}", 'name'=>name, 'value'=>value, 'args'=>args) end |
#initialize ⇒ Object
46 47 48 49 50 |
# File 'lib/Checked/DSL.rb', line 46 def initialize off! self.map = nil self.name = nil end |
#off! ⇒ Object
71 72 73 |
# File 'lib/Checked/DSL.rb', line 71 def off! @on = false end |
#off? ⇒ Boolean
67 68 69 |
# File 'lib/Checked/DSL.rb', line 67 def off? !@on end |
#on!(new_map) ⇒ Object
61 62 63 64 65 |
# File 'lib/Checked/DSL.rb', line 61 def on! new_map raise ArgumentError, "Map value unacceptable: #{new_map.inspect}" unless new_map self.map = new_map @on = true end |
#on? ⇒ Boolean
57 58 59 |
# File 'lib/Checked/DSL.rb', line 57 def on? @on end |