Class: ClassType
- Inherits:
-
Object
- Object
- ClassType
- Defined in:
- lib/yesman/class_type.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#super_class ⇒ Object
readonly
Returns the value of attribute super_class.
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize ⇒ ClassType
constructor
A new instance of ClassType.
- #parse_from_string(input) ⇒ Object
Constructor Details
#initialize ⇒ ClassType
Returns a new instance of ClassType.
10 11 12 13 14 15 |
# File 'lib/yesman/class_type.rb', line 10 def initialize @class_name = nil @namespace = nil @super_class = nil @source = ConfigProxy.new.params[:source] end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
5 6 7 |
# File 'lib/yesman/class_type.rb', line 5 def class_name @class_name end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
6 7 8 |
# File 'lib/yesman/class_type.rb', line 6 def namespace @namespace end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
8 9 10 |
# File 'lib/yesman/class_type.rb', line 8 def source @source end |
#super_class ⇒ Object (readonly)
Returns the value of attribute super_class.
7 8 9 |
# File 'lib/yesman/class_type.rb', line 7 def super_class @super_class end |
Instance Method Details
#get_binding ⇒ Object
31 32 33 |
# File 'lib/yesman/class_type.rb', line 31 def get_binding binding end |
#parse_from_string(input) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/yesman/class_type.rb', line 17 def parse_from_string input input = input.to_s st = input.split("<") st.each {|s| s.strip!} create_name_namespace st[0] if st[1] || st[1] != "" create_super st[1] else @super_class = nil end end |