Class: Cucumber::Core::Gherkin::Document

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/document.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri, body, language = nil) ⇒ Document

Returns a new instance of Document.



9
10
11
12
13
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/document.rb', line 9

def initialize(uri, body, language=nil)
  @uri      = uri
  @body     = body
  @language = language || 'en'
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



7
8
9
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/document.rb', line 7

def body
  @body
end

#languageObject (readonly)

Returns the value of attribute language.



7
8
9
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/document.rb', line 7

def language
  @language
end

#uriObject (readonly)

Returns the value of attribute uri.



7
8
9
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/document.rb', line 7

def uri
  @uri
end

Instance Method Details

#==(other) ⇒ Object



19
20
21
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/document.rb', line 19

def ==(other)
  to_s == other.to_s
end

#to_sObject



15
16
17
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/document.rb', line 15

def to_s
  body
end