Class: ClassType

Inherits:
Object
  • Object
show all
Defined in:
lib/yesman/class_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeClassType

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_nameObject (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

#namespaceObject (readonly)

Returns the value of attribute namespace.



6
7
8
# File 'lib/yesman/class_type.rb', line 6

def namespace
  @namespace
end

#sourceObject (readonly)

Returns the value of attribute source.



8
9
10
# File 'lib/yesman/class_type.rb', line 8

def source
  @source
end

#super_classObject (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_bindingObject



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