Class: Cassowary::AbstractVariable
- Inherits:
-
Object
- Object
- Cassowary::AbstractVariable
show all
- Defined in:
- lib/variables/abstract_variable.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of AbstractVariable.
7
8
9
|
# File 'lib/variables/abstract_variable.rb', line 7
def initialize(hash = {})
self.name = hash[:name]
end
|
Instance Attribute Details
Returns the value of attribute name.
5
6
7
|
# File 'lib/variables/abstract_variable.rb', line 5
def name
@name
end
|
Instance Method Details
#dummy? ⇒ Boolean
11
12
13
|
# File 'lib/variables/abstract_variable.rb', line 11
def dummy?
false
end
|
#external? ⇒ Boolean
15
16
17
|
# File 'lib/variables/abstract_variable.rb', line 15
def external?
raise NotImplementedError, "my subclass should have implemented #external?"
end
|
27
28
29
30
31
32
33
|
# File 'lib/variables/abstract_variable.rb', line 27
def inspect
if name
"#{name}"
else
"<CV#0x#{object_id.to_s(16)}>"
end
end
|
#pivotable? ⇒ Boolean
19
20
21
|
# File 'lib/variables/abstract_variable.rb', line 19
def pivotable?
raise NotImplementedError, "my subclass should have implemented #pivotable?"
end
|
#restricted? ⇒ Boolean
23
24
25
|
# File 'lib/variables/abstract_variable.rb', line 23
def restricted?
raise NotImplementedError, "my subclass should have implemented #restricted?"
end
|