Class: CaTissue::ControlledValue
- Inherits:
-
CaRuby::ControlledValue
- Object
- CaRuby::ControlledValue
- CaTissue::ControlledValue
- Defined in:
- lib/catissue/helpers/controlled_value.rb
Instance Attribute Summary collapse
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#public_id ⇒ Object
Returns the value of attribute public_id.
Class Method Summary collapse
-
.standard_public_id(public_id_or_alias) ⇒ String
The standard public id value for the given string or alias.
Instance Method Summary collapse
-
#parent_identifier ⇒ Integer
The identifier of the parent.
- #to_s ⇒ Object
Instance Attribute Details
#identifier ⇒ Object
Returns the value of attribute identifier.
12 13 14 |
# File 'lib/catissue/helpers/controlled_value.rb', line 12 def identifier @identifier end |
#public_id ⇒ Object
Returns the value of attribute public_id.
14 15 16 |
# File 'lib/catissue/helpers/controlled_value.rb', line 14 def public_id @public_id end |
Class Method Details
.standard_public_id(public_id_or_alias) ⇒ String
Returns the standard public id value for the given string or alias.
8 9 10 |
# File 'lib/catissue/helpers/controlled_value.rb', line 8 def self.standard_public_id(public_id_or_alias) PID_ALIAS_HASH[public_id_or_alias.to_sym] or public_id_or_alias.to_s end |
Instance Method Details
#parent_identifier ⇒ Integer
Returns the identifier of the parent.
17 18 19 |
# File 'lib/catissue/helpers/controlled_value.rb', line 17 def parent_identifier parent.identifier if parent end |
#to_s ⇒ Object
26 27 28 |
# File 'lib/catissue/helpers/controlled_value.rb', line 26 def to_s "#{value}" end |