Class: PageIntrospector
- Inherits:
-
Object
- Object
- PageIntrospector
- Defined in:
- lib/scaffolding/page_introspector.rb
Constant Summary collapse
- SKIP_METHODS =
%w[initialize url to_s inspect].freeze
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#methods ⇒ Object
readonly
Returns the value of attribute methods.
Instance Method Summary collapse
-
#initialize(file_path) ⇒ PageIntrospector
constructor
A new instance of PageIntrospector.
Constructor Details
#initialize(file_path) ⇒ PageIntrospector
Returns a new instance of PageIntrospector.
10 11 12 13 14 |
# File 'lib/scaffolding/page_introspector.rb', line 10 def initialize(file_path) @source = File.read(file_path) @class_name = extract_class_name @methods = extract_public_methods end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
8 9 10 |
# File 'lib/scaffolding/page_introspector.rb', line 8 def class_name @class_name end |
#methods ⇒ Object (readonly)
Returns the value of attribute methods.
8 9 10 |
# File 'lib/scaffolding/page_introspector.rb', line 8 def methods @methods end |