Class: Spec::DSL::Description
- Extended by:
- ClassMethods
- Defined in:
- lib/spec/dsl/description.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#described_type ⇒ Object
readonly
Returns the value of attribute described_type.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
Instance Method Summary collapse
- #==(value) ⇒ Object
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize(*args) ⇒ Description
constructor
A new instance of Description.
- #to_s ⇒ Object
Methods included from ClassMethods
Constructor Details
#initialize(*args) ⇒ Description
Returns a new instance of Description.
19 20 21 22 23 24 25 |
# File 'lib/spec/dsl/description.rb', line 19 def initialize(*args) args, @options = (*args) init_behaviour_type(@options) init_spec_path(@options) init_described_type(args) init_description(*args) end |
Instance Attribute Details
#described_type ⇒ Object (readonly)
Returns the value of attribute described_type.
17 18 19 |
# File 'lib/spec/dsl/description.rb', line 17 def described_type @described_type end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
17 18 19 |
# File 'lib/spec/dsl/description.rb', line 17 def description @description end |
Instance Method Details
#==(value) ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/spec/dsl/description.rb', line 37 def ==(value) case value when Description @description == value.description else @description == value end end |
#[](key) ⇒ Object
27 28 29 |
# File 'lib/spec/dsl/description.rb', line 27 def [](key) @options[key] end |
#[]=(key, value) ⇒ Object
31 32 33 |
# File 'lib/spec/dsl/description.rb', line 31 def []=(key, value) @options[key] = value end |
#to_s ⇒ Object
35 |
# File 'lib/spec/dsl/description.rb', line 35 def to_s; @description; end |