Class: Shaf::Command::Test::RunnableMethod
- Inherits:
-
Object
- Object
- Shaf::Command::Test::RunnableMethod
- Defined in:
- lib/shaf/command/test/runnable_method.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#runnable ⇒ Object
readonly
Returns the value of attribute runnable.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(runnable, name, line) ⇒ RunnableMethod
constructor
A new instance of RunnableMethod.
Constructor Details
#initialize(runnable, name, line) ⇒ RunnableMethod
Returns a new instance of RunnableMethod.
14 15 16 17 18 |
# File 'lib/shaf/command/test/runnable_method.rb', line 14 def initialize(runnable, name, line) @runnable = runnable @name = name @line = line end |
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
7 8 9 |
# File 'lib/shaf/command/test/runnable_method.rb', line 7 def line @line end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/shaf/command/test/runnable_method.rb', line 7 def name @name end |
#runnable ⇒ Object (readonly)
Returns the value of attribute runnable.
7 8 9 |
# File 'lib/shaf/command/test/runnable_method.rb', line 7 def runnable @runnable end |
Class Method Details
.from(runnable, method_name) ⇒ Object
9 10 11 12 |
# File 'lib/shaf/command/test/runnable_method.rb', line 9 def self.from(runnable, method_name) _, line = runnable.instance_method(method_name).source_location new(runnable, method_name, line) end |