Class: Docks::Containers::Klass
- Inherits:
-
Symbol
show all
- Defined in:
- lib/docks/containers/class_container.rb
Overview
Public: a container for Class symbols.
Instance Attribute Summary
Attributes inherited from Symbol
#belongs_to, #methods, #properties
Class Method Summary
collapse
-
.type ⇒ Object
Public: the type of symbols that should be encapsulated by this container.
Instance Method Summary
collapse
Methods inherited from Symbol
#add_members, #find, from_symbol, #has_members?, #initialize, #member?, #members, #private?, #public?, #summary, #symbol_id, #to_descriptor
Methods inherited from Base
#==, #[], #[]=, #delete, #fetch, #find, #initialize, #method_missing, #respond_to?, #summarized?, #summary, #tags, #to_h, #update
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Docks::Containers::Base
Class Method Details
.type ⇒ Object
Public: the type of symbols that should be encapsulated by this container. This is compared against a symbol’s ‘symbol_type` to determine which container to use.
Returns the type String.
15
|
# File 'lib/docks/containers/class_container.rb', line 15
def self.type; Docks::Types::Symbol::CLASS end
|
Instance Method Details
#add_member(symbol) ⇒ Object
32
33
34
35
36
|
# File 'lib/docks/containers/class_container.rb', line 32
def add_member(symbol)
static = symbol.static?
super
symbol.static = static
end
|
#instance_members ⇒ Object
29
|
# File 'lib/docks/containers/class_container.rb', line 29
def instance_members; instance_methods + instance_properties end
|
#instance_methods ⇒ Object
21
|
# File 'lib/docks/containers/class_container.rb', line 21
def instance_methods; methods.reject { |meth| meth.static? } end
|
#instance_properties ⇒ Object
27
|
# File 'lib/docks/containers/class_container.rb', line 27
def instance_properties; properties.reject { |prop| prop.static? } end
|
#private_methods ⇒ Object
18
|
# File 'lib/docks/containers/class_container.rb', line 18
def private_methods; methods.select { |meth| meth.private? } end
|
#private_properties ⇒ Object
24
|
# File 'lib/docks/containers/class_container.rb', line 24
def private_properties; properties.select { |prop| prop.private? } end
|
#public_methods ⇒ Object
17
|
# File 'lib/docks/containers/class_container.rb', line 17
def public_methods; methods.select { |meth| meth.public? } end
|
#public_properties ⇒ Object
23
|
# File 'lib/docks/containers/class_container.rb', line 23
def public_properties; properties.select { |prop| prop.public? } end
|
#static_members ⇒ Object
30
|
# File 'lib/docks/containers/class_container.rb', line 30
def static_members; static_methods + static_properties end
|
#static_methods ⇒ Object
20
|
# File 'lib/docks/containers/class_container.rb', line 20
def static_methods; methods.select { |meth| meth.static? } end
|
#static_properties ⇒ Object
26
|
# File 'lib/docks/containers/class_container.rb', line 26
def static_properties; properties.select { |prop| prop.static? } end
|