Class: Sfp::Undefined
- Inherits:
-
Object
- Object
- Sfp::Undefined
- Defined in:
- lib/sfp/Sfplib.rb
Overview
Instance of this class will be returned as the value of a non-exist variable
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path = nil, type = nil) ⇒ Undefined
constructor
A new instance of Undefined.
- #to_s ⇒ Object
Constructor Details
#initialize(path = nil, type = nil) ⇒ Undefined
Returns a new instance of Undefined.
182 183 184 185 |
# File 'lib/sfp/Sfplib.rb', line 182 def initialize(path=nil, type=nil) @path = path @type = type end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
181 182 183 |
# File 'lib/sfp/Sfplib.rb', line 181 def path @path end |
#type ⇒ Object
Returns the value of attribute type.
181 182 183 |
# File 'lib/sfp/Sfplib.rb', line 181 def type @type end |
Class Method Details
Instance Method Details
#to_s ⇒ Object
187 188 189 |
# File 'lib/sfp/Sfplib.rb', line 187 def to_s (@type.nil? ? "$.Undefined" : "$.Undefined.#{@type}") end |