class Rspec::Usecases::Contents::Code

Code

Attributes

code_type[RW]

Type of code, ruby, javascript, css etc.

note[RW]

Note

Public Class Methods

new(type, example) click to toggle source
# File lib/rspec/usecases/contents/code.rb, line 17
def initialize(type, example)
  super(type, example)

  @code_type = example.metadata[:code_type].to_s
  @note = example.metadata[:note].to_s
end

Public Instance Methods

to_h() click to toggle source
# File lib/rspec/usecases/contents/code.rb, line 24
def to_h
  {
    code_type: code_type,
    note: note
  }.merge(super.to_h)
end