Class: Gloo::Objs::Stats
- Inherits:
-
Core::Obj
- Object
- Core::Baseo
- Core::Obj
- Gloo::Objs::Stats
- Defined in:
- lib/gloo/objs/dev/stats.rb
Constant Summary collapse
- KEYWORD =
'stats'.freeze
- KEYWORD_SHORT =
'stat'.freeze
- FOLDER =
'folder'.freeze
- TYPES =
'types'.freeze
- SKIP =
'skip'.freeze
Constants inherited from Core::Baseo
Core::Baseo::NOT_IMPLEMENTED_ERR
Instance Attribute Summary
Attributes inherited from Core::Obj
Attributes inherited from Core::Baseo
Class Method Summary collapse
-
.messages ⇒ Object
Get a list of message names that this object receives.
-
.short_typename ⇒ Object
The short name of the object type.
-
.typename ⇒ Object
The name of the object type.
Instance Method Summary collapse
-
#add_children_on_create? ⇒ Boolean
Does this object have children to add when an object is created in interactive mode? This does not apply during obj load, etc.
-
#add_default_children ⇒ Object
Add children to this object.
-
#msg_show_all ⇒ Object
Show all project stats.
-
#msg_show_busy_folders ⇒ Object
Show busy folders: those with the most files.
-
#msg_show_types ⇒ Object
Show file types.
-
#path_value ⇒ Object
Get the path to the git repo (locally).
-
#skip_list ⇒ Object
Get the list of files and folders to skip.
-
#types_value ⇒ Object
The code file types to count.
Methods inherited from Core::Obj
#add_child, can_create?, #can_receive_message?, #child_count, #child_index, #contains_child?, #delete_children, #dispatch, #display_value, #find_add_child, #find_child, help, inherited, #initialize, #is_alias?, #is_function?, #msg_reload, #msg_unload, #multiline_value?, #pn, #remove_child, #render, #root?, #send_message, #set_parent, #set_value, #type_display, #value_display, #value_is_array?, #value_is_blank?, #value_string?
Methods inherited from Core::Baseo
Constructor Details
This class inherits a constructor from Gloo::Core::Obj
Class Method Details
.messages ⇒ Object
Get a list of message names that this object receives.
88 89 90 91 92 |
# File 'lib/gloo/objs/dev/stats.rb', line 88 def self. all = %w[show_all] more = %w[show_busy_folders show_types] return super + all + more end |
.short_typename ⇒ Object
The short name of the object type.
27 28 29 |
# File 'lib/gloo/objs/dev/stats.rb', line 27 def self.short_typename return KEYWORD_SHORT end |
.typename ⇒ Object
The name of the object type.
20 21 22 |
# File 'lib/gloo/objs/dev/stats.rb', line 20 def self.typename return KEYWORD end |
Instance Method Details
#add_children_on_create? ⇒ Boolean
Does this object have children to add when an object is created in interactive mode? This does not apply during obj load, etc.
65 66 67 |
# File 'lib/gloo/objs/dev/stats.rb', line 65 def add_children_on_create? return true end |
#add_default_children ⇒ Object
Add children to this object. This is used by containers to add children needed for default configurations.
74 75 76 77 78 79 |
# File 'lib/gloo/objs/dev/stats.rb', line 74 def add_default_children fac = @engine.factory fac.create_file FOLDER, '', self fac.create_string TYPES, '', self fac.create_can SKIP, self end |
#msg_show_all ⇒ Object
Show all project stats.
97 98 99 100 101 |
# File 'lib/gloo/objs/dev/stats.rb', line 97 def msg_show_all o = Gloo::Utils::Stats.new( @engine, path_value, types_value, skip_list ) o.show_all end |
#msg_show_busy_folders ⇒ Object
Show busy folders: those with the most files.
115 116 117 118 119 |
# File 'lib/gloo/objs/dev/stats.rb', line 115 def msg_show_busy_folders o = Gloo::Utils::Stats.new( @engine, path_value, types_value, skip_list ) o.busy_folders end |
#msg_show_types ⇒ Object
Show file types.
106 107 108 109 110 |
# File 'lib/gloo/objs/dev/stats.rb', line 106 def msg_show_types o = Gloo::Utils::Stats.new( @engine, path_value, types_value, skip_list ) o.file_types end |
#path_value ⇒ Object
Get the path to the git repo (locally).
34 35 36 37 |
# File 'lib/gloo/objs/dev/stats.rb', line 34 def path_value o = find_child FOLDER return o ? o.value : nil end |
#skip_list ⇒ Object
Get the list of files and folders to skip.
50 51 52 53 54 |
# File 'lib/gloo/objs/dev/stats.rb', line 50 def skip_list o = find_child SKIP val = o ? o.value : '' return val.split ' ' end |
#types_value ⇒ Object
The code file types to count.
42 43 44 45 |
# File 'lib/gloo/objs/dev/stats.rb', line 42 def types_value o = find_child TYPES return o ? o.value : '' end |