Class: VR::ObjectInspector::MethodsListView
- Defined in:
- lib/oinspect/MethodsListView.rb
Instance Attribute Summary
Attributes included from ViewCommon
#column_keys, #vr_cols, #vr_column, #vr_id, #vr_renderer
Instance Method Summary collapse
-
#initialize(obj) ⇒ MethodsListView
constructor
A new instance of MethodsListView.
Methods inherited from ListView
#[], #add_active_record_rows, #add_row, #select_row
Methods included from ViewCommon
#add_column, #add_renderer_to_col, #col_attr, #column, #delete_selected, #each_cell_method, #each_renderer, #each_row, #flatten_hash, #get_iter, #id, #method_missing, #ren_attr, #renderer, #selected_rows, #turn_on_comboboxes, #vr_row
Constructor Details
#initialize(obj) ⇒ MethodsListView
Returns a new instance of MethodsListView
5 6 7 8 9 10 11 12 13 |
# File 'lib/oinspect/MethodsListView.rb', line 5 def initialize(obj) super(:method => String, :arity => String, :parameters => String) obj.public_methods.each do |meth| row = add_row row[:method] = meth.to_s row[:arity] = obj.method(meth).arity.to_s row[:parameters] = obj.method(meth).parameters.to_s end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class VR::ViewCommon