Class: Zakuro::Operation::Annotation

Inherits:
Object
  • Object
show all
Defined in:
lib/zakuro/operation/month/type.rb

Overview

Annotation 注釈

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id: '', description: '', note: '') ⇒ Annotation

初期化

Parameters:

  • id (String) (defaults to: '')

    ID

  • description (String) (defaults to: '')

    内容

  • note (String) (defaults to: '')

    正誤訂正(zakuro)



90
91
92
93
94
# File 'lib/zakuro/operation/month/type.rb', line 90

def initialize(id: '', description: '', note: '')
  @id = id
  @description = description
  @note = note
end

Instance Attribute Details

#descriptionString (readonly)

Returns 内容.

Returns:

  • (String)

    内容



79
80
81
# File 'lib/zakuro/operation/month/type.rb', line 79

def description
  @description
end

#idString (readonly)

Returns ID.

Returns:

  • (String)

    ID



77
78
79
# File 'lib/zakuro/operation/month/type.rb', line 77

def id
  @id
end

#noteString (readonly)

Returns 正誤訂正(zakuro).

Returns:

  • (String)

    正誤訂正(zakuro)



81
82
83
# File 'lib/zakuro/operation/month/type.rb', line 81

def note
  @note
end

Instance Method Details

#invalid?True, False

無効か

Returns:

  • (True)

    無効

  • (False)

    有効



102
103
104
105
106
# File 'lib/zakuro/operation/month/type.rb', line 102

def invalid?
  return true if @id == ''

  @description == '' && @note == ''
end