Class: RSpec::ApiGen::Argument
- Inherits:
-
Object
- Object
- RSpec::ApiGen::Argument
- Defined in:
- lib/rspec-apigen/argument.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
- #accept_block? ⇒ Boolean
-
#initialize(name, description, accept_block = false) ⇒ Argument
constructor
A new instance of Argument.
- #to_s ⇒ Object
Constructor Details
#initialize(name, description, accept_block = false) ⇒ Argument
Returns a new instance of Argument.
5 6 7 8 9 |
# File 'lib/rspec-apigen/argument.rb', line 5 def initialize(name, description, accept_block = false) @name = name @description = description @accept_block = accept_block end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/rspec-apigen/argument.rb', line 3 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/rspec-apigen/argument.rb', line 3 def name @name end |
Class Method Details
.describe(args) ⇒ Object
32 33 34 |
# File 'lib/rspec-apigen/argument.rb', line 32 def self.describe(args) "(#{inspect_args(args).join(', ')})" end |
Instance Method Details
#accept_block? ⇒ Boolean
11 12 13 |
# File 'lib/rspec-apigen/argument.rb', line 11 def accept_block? @accept_block end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/rspec-apigen/argument.rb', line 15 def to_s "Arg #{name}" end |