Class: PageIntrospector

Inherits:
Object
  • Object
show all
Defined in:
lib/scaffolding/page_introspector.rb

Constant Summary collapse

SKIP_METHODS =
%w[initialize url to_s inspect].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#methodsObject (readonly)

Returns the value of attribute methods.



8
9
10
# File 'lib/scaffolding/page_introspector.rb', line 8

def methods
  @methods
end