Class: StonesSpec::Subject::Callable
- Inherits:
-
Object
- Object
- StonesSpec::Subject::Callable
- Defined in:
- lib/subject.rb
Instance Method Summary collapse
- #call_string(arguments) ⇒ Object
- #default_expectations ⇒ Object
- #default_title(arguments) ⇒ Object
-
#initialize(name) ⇒ Callable
constructor
A new instance of Callable.
Constructor Details
#initialize(name) ⇒ Callable
Returns a new instance of Callable.
34 35 36 |
# File 'lib/subject.rb', line 34 def initialize(name) @name = name end |
Instance Method Details
#call_string(arguments) ⇒ Object
38 39 40 |
# File 'lib/subject.rb', line 38 def call_string(arguments) "#{@name}(#{arguments.join(', ')})" end |
#default_expectations ⇒ Object
46 47 48 49 |
# File 'lib/subject.rb', line 46 def default_expectations [ { 'binding' => 'program', 'inspection' => 'Not:HasBinding' }, { 'binding' => "#{@name}", 'inspection' => 'HasBinding' } ] end |
#default_title(arguments) ⇒ Object
42 43 44 |
# File 'lib/subject.rb', line 42 def default_title(arguments) call_string arguments end |