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.



254
255
256
257
258
# File 'lib/kotoshu/languages/pt/language.rb', line 254

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

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



252
253
254
# File 'lib/kotoshu/languages/pt/language.rb', line 252

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



252
253
254
# File 'lib/kotoshu/languages/pt/language.rb', line 252

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



252
253
254
# File 'lib/kotoshu/languages/pt/language.rb', line 252

def name
  @name
end

Instance Method Details

#check(tokens) ⇒ Object

Raises:

  • (NotImplementedError)


260
261
262
# File 'lib/kotoshu/languages/pt/language.rb', line 260

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