class

Stringventory::Models::Guitar

Inherits YAML::Serializable < JSON::Serializable < Granite::Base < Granite::Select < Granite::Migrator < Granite::ValidationHelpers < Granite::Validators < Granite::Transactions < Granite::Tables < Granite::Columns < Granite::Callbacks < Granite::Associations < Reference < Object

Class representing a guitar.

Constructors

new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
new(pull : JSON::PullParser)
new(*, __pull_for_json_serializable pull : JSON::PullParser)
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)

Class methods

adapter

Instance methods

bought_on

When the guitar was bought or delivered, distinct from when the database object was created or updated.

Source
bought_on=(bought_on : Time)

When the guitar was bought or delivered, distinct from when the database object was created or updated.

Source
id

Primary key for the table. Not used otherwise.

Source
id!

Primary key for the table. Not used otherwise.

Source
id=(id : Int64 | Nil)

Primary key for the table. Not used otherwise.

Source
last_change
Source
name

Name of the guitar. Must be unique

Source
name=(name : String)

Name of the guitar. Must be unique

Source
num_strings

Number of strings on the guitar. Defaults to 6

Source
num_strings=(num_strings : Int32)

Number of strings on the guitar. Defaults to 6

Source
string_changes

Instances where the strings have been changed on the guitar.

Source
to_s

To string method that returns a reasonable string representation of the guitar.

Source