Class: Protod::Proto::Ident
- Inherits:
-
String
- Object
- String
- Protod::Proto::Ident
- Defined in:
- lib/protod/proto/features.rb
Instance Attribute Summary collapse
-
#const_name ⇒ Object
readonly
Returns the value of attribute const_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(const_name) ⇒ Ident
constructor
A new instance of Ident.
Constructor Details
#initialize(const_name) ⇒ Ident
Returns a new instance of Ident.
25 26 27 28 29 |
# File 'lib/protod/proto/features.rb', line 25 def initialize(const_name) @const_name = Protod::RubyIdent.absolute_of(const_name) super(const_name.gsub('::', '__').delete_prefix('__')) end |
Instance Attribute Details
#const_name ⇒ Object (readonly)
Returns the value of attribute const_name.
23 24 25 |
# File 'lib/protod/proto/features.rb', line 23 def const_name @const_name end |
Class Method Details
.build_from(const_name) ⇒ Object
16 17 18 19 20 |
# File 'lib/protod/proto/features.rb', line 16 def build_from(const_name) return if const_name.blank? new(const_name) end |