Permalink
Browse files

Bring ABC up to the current spec for bless.

  • Loading branch information...
1 parent 59b69d7 commit 1522250252c86cff72820aa9be232654b35216b2 @colomon committed Sep 1, 2013
View
@@ -13,7 +13,7 @@ class ABC::BrokenRhythm does ABC::Duration does ABC::Pitched {
has $.stem2;
method new($stem1, $gracing1, $broken-rhythm, $gracing2, $stem2) {
- self.bless(*, :$stem1, :$gracing1, :$broken-rhythm, :$gracing2, :$stem2,
+ self.bless(:$stem1, :$gracing1, :$broken-rhythm, :$gracing2, :$stem2,
:ticks($stem1.ticks + $stem2.ticks));
}
View
@@ -9,7 +9,7 @@ class ABC::Chord does ABC::Pitched {
has $.bass-accidental;
method new($main-note, $main-accidental, $main-type, $bass-note, $bass-accidental) {
- self.bless(*, :$main-note, :$main-accidental, :$main-type, :$bass-note, :$bass-accidental);
+ self.bless(:$main-note, :$main-accidental, :$main-type, :$bass-note, :$bass-accidental);
}
method Str() {
View
@@ -8,17 +8,17 @@ class ABC::Context {
has %.accidentals;
multi method new($key-name, $meter, $length, :$current-key-info) {
- self.bless(*, :$key-name,
- :key-info(ABC::KeyInfo.new($key-name, :$current-key-info)),
- :$meter,
- :$length);
+ self.bless(:$key-name,
+ :key-info(ABC::KeyInfo.new($key-name, :$current-key-info)),
+ :$meter,
+ :$length);
}
multi method new(ABC::Context $other) {
- self.bless(*, :key-name($other.key-name),
- :key-info(ABC::KeyInfo.new($other.key-name)),
- :meter($other.meter),
- :length($other.length));
+ self.bless(:key-name($other.key-name),
+ :key-info(ABC::KeyInfo.new($other.key-name)),
+ :meter($other.meter),
+ :length($other.length));
}
method bar-line () {
View
@@ -8,7 +8,7 @@ class ABC::GraceNotes does ABC::Pitched {
method new($acciaccatura, @notes) {
die "GraceNotes must have at least one note" if +@notes == 0;
- self.bless(*, :$acciaccatura, :@notes);
+ self.bless(:$acciaccatura, :@notes);
}
method Str() {
View
@@ -79,7 +79,7 @@ class ABC::KeyInfo {
$clef-info = ~($clef<clef-name> // $clef<clef-note>);
}
- self.bless(*, :key(%key-info), :clef($clef-info));
+ self.bless(:key(%key-info), :clef($clef-info));
}
}
View
@@ -4,7 +4,7 @@ class ABC::LongRest {
has $.measures_rest;
method new($measures_rest) {
- self.bless(*, :measures_rest(+$measures_rest));
+ self.bless(:measures_rest(+$measures_rest));
}
method Str() {
View
@@ -10,7 +10,7 @@ class ABC::Note does ABC::Duration does ABC::Pitched {
has $.is-tie;
method new($accidental, $basenote, $octave, ABC::Duration $duration, $is-tie) {
- self.bless(*, :$accidental, :$basenote, :$octave, :ticks($duration.ticks), :$is-tie);
+ self.bless(:$accidental, :$basenote, :$octave, :ticks($duration.ticks), :$is-tie);
}
method pitch() {
View
@@ -6,7 +6,7 @@ class ABC::Rest does ABC::Duration {
has $.type;
method new($type, ABC::Duration $duration) {
- self.bless(*, :$type, :ticks($duration.ticks));
+ self.bless(:$type, :ticks($duration.ticks));
}
method Str() {
View
@@ -9,7 +9,7 @@ class ABC::Stem does ABC::Duration does ABC::Pitched {
method new(@notes, ABC::Duration $duration, $is-tie) {
die "Stem must have at least one note" if +@notes == 0;
- self.bless(*, :@notes, :ticks(@notes>>.ticks.max * $duration.ticks), :$is-tie);
+ self.bless(:@notes, :ticks(@notes>>.ticks.max * $duration.ticks), :$is-tie);
}
method Str() {
View
@@ -7,7 +7,7 @@ class ABC::Tune {
has @.music;
multi method new(ABC::Header $header, @music) {
- self.bless(*, :$header, :@music);
+ self.bless(:$header, :@music);
}
method transpose(Int $steps-up) {
View
@@ -9,7 +9,7 @@ class ABC::Tuplet does ABC::Duration does ABC::Pitched {
method new($tuple, @notes) {
die "Tuplet must have at least one note" if +@notes == 0;
- self.bless(*, :$tuple, :@notes, :ticks(2/$tuple * [+] @notes>>.ticks));
+ self.bless(:$tuple, :@notes, :ticks(2/$tuple * [+] @notes>>.ticks));
}
method Str() {
View
@@ -150,7 +150,7 @@ class Transposer {
has %.current-to;
multi method new(%key-changes, $half-step-shift) {
- self.bless(*, :%key-changes, :$half-step-shift);
+ self.bless(:%key-changes, :$half-step-shift);
}
method set-key($new-key) {

0 comments on commit 1522250

Please sign in to comment.