Class: Evertils::Grammar

Inherits:
Object
  • Object
show all
Defined in:
lib/evertils/grammar.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGrammar

Since:

  • 1.0.12



10
11
12
13
14
15
16
# File 'lib/evertils/grammar.rb', line 10

def initialize
  @tags = []
  @grammar = []
  @notebook = nil
  @intitle = nil
  @created = Date.today.strftime('%Y%m%d')
end

Instance Attribute Details

#createdObject

Returns the value of attribute created.



5
6
7
# File 'lib/evertils/grammar.rb', line 5

def created
  @created
end

#intitleObject

Returns the value of attribute intitle.



5
6
7
# File 'lib/evertils/grammar.rb', line 5

def intitle
  @intitle
end

#notebookObject

Returns the value of attribute notebook.



5
6
7
# File 'lib/evertils/grammar.rb', line 5

def notebook
  @notebook
end

#tagsObject

Returns the value of attribute tags.



5
6
7
# File 'lib/evertils/grammar.rb', line 5

def tags
  @tags
end

Instance Method Details

#to_sObject

Since:

  • 1.0.12



20
21
22
23
24
25
26
# File 'lib/evertils/grammar.rb', line 20

def to_s
  @grammar = []
  stringify_properties
  stringify_tags unless @tags.empty?

  @grammar.join(' ')
end