Class: Kotoshu::Languages::Portuguese::GrammarRules::Rule

Inherits:
Object
  • Object
show all
Defined in:
lib/kotoshu/languages/pt/language.rb

Direct Known Subclasses

CraseRule, PersonalInfinitiveRule

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, name, description) ⇒ Rule

Returns a new instance of Rule.



264
265
266
267
268
# File 'lib/kotoshu/languages/pt/language.rb', line 264

def initialize(id, name, description)
  @id = id
  @name = name
  @description = description
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



262
263
264
# File 'lib/kotoshu/languages/pt/language.rb', line 262

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



262
263
264
# File 'lib/kotoshu/languages/pt/language.rb', line 262

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



262
263
264
# File 'lib/kotoshu/languages/pt/language.rb', line 262

def name
  @name
end

Instance Method Details

#check(tokens) ⇒ Object

Raises:

  • (NotImplementedError)


270
271
272
# File 'lib/kotoshu/languages/pt/language.rb', line 270

def check(tokens)
  raise NotImplementedError, "#{self.class} must implement #check"
end